题解列表
A+B for Input-Output Practice (II) (C语言代码)
摘要:#include <stdio.h>int main(){ int a,b,n; scanf("%d",&n); while (n--) { scanf("%d%d",&a,&b); printf……
A+B for Input-Output Practice (III) (C语言代码)
摘要:#include <stdio.h>int main(){ int a,b ; while(scanf("%d %d",&a,&b)) { if (a==0&&b==0) brea……
A+B for Input-Output Practice (IV) (C语言代码)
摘要:#include <stdio.h>int main(){ int a,b,c; while(scanf("%d",&a)&&a>0) { c=0; while (a--) ……
A+B for Input-Output Practice (V) (C语言代码)
摘要:#include <stdio.h>int main(){ int a,b,c,n; scanf("%d",&n); while((n--)&&scanf("%d",&a)) { c=0; ……
A+B for Input-Output Practice (VI) (C语言代码)
摘要:#include <stdio.h>int main(){ int i,a,num,sum; while(scanf("%d",&a)!=EOF) { sum=0; for(i=0;……
C语言程序设计教程(第三版)课后习题6.3 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
main()
{
int n,a=2,m=0,sn=0;
scanf("%d",&n);
while(m<n)
{
sn……
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c,max; scanf("%d%d%d",&a,&b,&c); max=a; if(b>max……
C语言程序设计教程(第三版)课后习题8.3 (C语言代码)
摘要:解题思路:利用上面一题求1-N内的素数一样的原理注意事项:这个实现的代码,只可以鉴别一个,如果想要输入多个数,要用while(scanf("%d",&x)!=EOF){....}用这个框架来实现。参考……
C语言程序设计教程(第三版)课后习题5.8 (C语言代码)
摘要:解题思路:注意事项:参考代码:#include<stdio.h>
int main()
{
int x,s;
scanf("%d",&x);
if(x>0 && x<=100000)
{
……