博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
c语言5-1
阅读量:4350 次
发布时间:2019-06-07

本文共 312 字,大约阅读时间需要 1 分钟。

#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;}

#include "stdafx.h"
#include "stdio.h"
int main(){
long s,a;
a=-2; 
for(s=2;s<=1002;s+=20){
 a=a+s;}
printf("%d",a);
return 0;}

转载于:https://www.cnblogs.com/p201821440019/p/10750192.html

你可能感兴趣的文章
lvs,nginx反向代理,虚拟主机
查看>>
jquip,更简洁的代码
查看>>
【OJ】PAT-A解题报告
查看>>
基础练习 回文数
查看>>
科普-- 白话HTTPS
查看>>
文档语法
查看>>
利用套接字实现进程通信一例
查看>>
linux中shell变量$#,$@,$0,$1,$2的含义解释
查看>>
常用的shell命令整理
查看>>
A Brief Introduction to the Design of UBIFS
查看>>
了解你的Linux系统:必须掌握的20个命令
查看>>
js setInterval 启用&停止
查看>>
knockoutJS学习笔记04:监控属性
查看>>
18.10.6 考试总结
查看>>
iptables防火墙网路安全实践配置
查看>>
ASP.net Web窗体添加多条数据到数据库
查看>>
PHP面向对象(三)
查看>>
mysql与实际时间有8小时差怎么办
查看>>
docker 常用命令
查看>>
微信小程序 - 参数传递
查看>>