- 5
- 0
- 约2.49万字
- 约 35页
- 2019-02-24 发布于江苏
- 举报
第5章 利用数组处理批量数据
例5.1
#include stdafx.h
#include iostream
#include conio.h
using namespace std;
int main()
{
int i,a[10];
for(i=0;i=9;i++)
a[i]=i;
for(i=9;i=0;i--)
couta[i] ;
coutendl;
getch();
return 0;
}
例5.2
#include stdafx.h
#include iostream
#include conio.h
#include iomanip
using namespace std;
int main()
{
int i;
int f[20]={1,1};
for(i=2;i=20;i++)
f[i]=f[i-2]+f[i-1];
for(i=0;i20;i++)
{
if(i%5==0) coutendl;
coutsetw(8)f[i];
}
coutendl;
getch(
您可能关注的文档
最近下载
- 2026校招:恒申控股笔试题及答案.doc VIP
- 2026年江西省抚州市中考数学模拟试卷.docx VIP
- 2026年红色旅游红色文创产品开发报告.docx
- 2026年江西省抚州市中考物理模拟试卷试题(含答案详解).docx VIP
- DL 5009.1-2014 电力建设安全工作规程 第1 部分:火力发电.pdf
- 2026年江西省抚州市中考物理模拟试卷试题(含答案详解).pdf VIP
- 超声手指探头及其方法.pdf VIP
- RSSP-I铁路信号安全通信协议.docx
- GB∕T 17166-2019 能源审计技术通则(高清版).pdf
- SY-T 6 426-2005 钻井井控技术规程.pdf VIP
原创力文档

文档评论(0)