close
感謝蕭聖偉大大 po
#include
int main()
{
int n10;
int w;
int n2;
int n8;
int rem;
int quo;
char aq;
aq='A' ;
cout do {
w=1;
n2=0;
cout cin >> n10;
quo=n10;
while (quo>=2) {
rem=quo % 2;
quo/=2;
n2+=rem*w;
w*=10;
}
n2+=quo*w;
cout n8=0;
w=1;
quo=n10;
while (quo>=8) {
rem=quo % 8;
quo/=8;
n8+=rem*w;
w*=10;
}
n8+=quo*w;
cout cout cin >> aq;
if (aq!='A'){
aq='Q';}
}while (aq=='A');
return 0;
}
全站熱搜
留言列表