题解 1192: 十->二进制转换

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

十->二进制转换

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;string decToBin(int n){    string ans;    ……

编写题解 1192: 十->二进制转换

摘要:解题思路:注意事项://取绝对值,方便计算以及输出//输出10进制数//输出二进制数负号//存放二进制数//取绝对值,方便计算以及输出//换行参考代码:#include <stdio.h>#inclu……

十进制转二进制

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<stack>stack<char> s;int main(){    int……

十进制转二进制

摘要:小白,有好的方法请留言交流 ```c #include int main() { int s[100]; //用来存放二进制数 int n; //……

用栈解决这个问题

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>#include<math.h>#define maxsize 101typedef struct{……

位运算是个简便方法

摘要:参考代码:#include<bits/stdc++.h> using namespace std; int wei(int n) { int cnt=0; while(n!=0) {……