解题思路:
注意事项:
参考代码:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
int n,i,g;
int s[100]={0};
int c=0;
scanf("%d",&n);
int t=0;
while(n!=0){
g=n%10;
n=n/10;
c=n-g*5;
if(c%17==0){
s[t]=1;
}
else{
s[t]=0;
}
t++;
scanf("%d",&n);
}
for(i=0;i<t;i++)
printf("%d\n",s[i]);
return 0;
}
0.0分
0 人评分
小明A+B (C语言代码)浏览:1256 |
C语言程序设计教程(第三版)课后习题6.4 (C语言代码)浏览:1042 |
A+B for Input-Output Practice (V) (C语言代码)浏览:625 |
WU-蓝桥杯算法提高VIP-交换Easy (C++代码)浏览:1119 |
剪刀石头布 (C语言代码)浏览:1755 |
C语言程序设计教程(第三版)课后习题9.1 (C语言代码)浏览:681 |
A+B for Input-Output Practice (V) (C语言代码)浏览:469 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:407 |
1054题解浏览:467 |
1051(奇了怪了)浏览:649 |