- 博客(1)
- 收藏
- 关注
原创 求s不超过1000时n的最大值,s=1+2+3+…+n。
#include<stdio.h> int main() { int s = 0, n; for ( n=1;;n++) { s += n; if (s > 1000) break; } printf("Max_s=%d,n=%d", s-n, n-1); return 0; }
2022-11-15 22:59:09 1293
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人