代码如下:#include
using namespace std;
long int B(long int x)
{
long int m, b = 0;
while (x > 0)
{
m = x % 10;
x = x / 10;
b = b * 10 + m;
}
return b;
}
int main()
{
int x = 11, a[100], b[100], k, i, sum, q, w, l;
while (x > 10 )
{
sum = 0, i = 0, q = 0, w = 0;
k = x;
l = x;
while (l > 0)
{
b[q] = l % 8;
l = l / 8;
q++;
}
while (k > 0)
{
a[i] = k % 2;
k = k / 2;
i++;
}
for (int j = i - 1; j >= 0; j--)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)