摘要: 编写程序,使用while语句求和sum=1+3+5+…+21 #include <stdio.h> main() { int i=1,sum=0; while(i<=21) { sum+=i; i+=2; } printf("sum=%d\n",sum); } 编写程序,使用while语句求和sum 阅读全文
posted @ 2021-11-05 19:41 风再起时, 阅读(14) 评论(0) 推荐(0) 编辑