11 2021 档案

摘要:输出以下图形 #include <stdio.h> main() { int a,b,n; for(a=1;a<=5;a++) { printf("\n"); for(b=1;b<=a;b++) { printf("*"); } } 输出以下图形 #include <stdio.h> main() 阅读全文
posted @ 2021-11-18 17:30 MENGYINGCAI 阅读(34) 评论(0) 推荐(0)
摘要:1编写程序,使用while语句求和sum1+2+3+5+…+21. #include<stdio.h> main() { int i=1;int sum=0; while(i<=21) { sum+=i; i+=2; } printf("Sum=%d\n",sum); } 编写程序,使用while语 阅读全文
posted @ 2021-11-06 16:47 MENGYINGCAI 阅读(42) 评论(0) 推荐(0)