#include "stdafx.h"
#include "stdio.h"
int main(){
long s,a;
a=0;  
s=22;

do{
    a=s+a;
s+=20;
}
while(s<=1002);
printf("%d",a);
return 0;}

c语言5-1 随笔 第1张

c语言5-1 随笔 第2张

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。


#include "stdafx.h"
#include "stdio.h"
int main(){
long s,a;
a=-2; 
for(s=2;s<=100c语言5-1 随笔 第3张2;s+=20){
 a=a+s;}
printf("%d",a);
return 0;}

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄