[求助]大家帮个忙啊,一道填空题
题目要求输出从0到max_num中用二进制和十进制表示都是回文数的整数。。。。#include<iostream.h>
#include<iomanip.h>
static int is_circle_num(int number,int radius);
int main()
{
int num,max_num;
cout<<"Please input an interger (for example 1200) :";
cin>>max_num;
for(num=0;num<max_num;num++){
if (is_circle_num(num,10)==1&&is_circle_num(num,2)==1){
cout<<setw(6)<<num;
cout<<" is a circle number in decimal and binary system!\n";
}
}
return 0;
}
int is_circle_num(int number,int radius)
{
int left_num,right_num;
int max_power,left_power,right_power;
max_power=1;
while(_________________){
max_power*=radius;
}
left_power=max_power;
right_power=radius;
while(_________________){
right_num=___________________;
left_num=__________________;
if(right_num!=left_num) return 0;
right_power*=radius;
left_power/=radius;
}
return 1;
}