c++重新学习1全局数组与数组初始化

 1 //this file is used to test ShuZe
 2 #include<iostream>
 3 #include<cmath>
 4 #include<cstdio>
 5 #include<cstring>
 6 using namespace std;
 7 int a[100];
 8 int main()
 9 {
10     for(int i=0;i<=99;i++)
11     {
12         cout<<a[i];
13         if(a[i]%5==4)
14         cout<<endl;
15         else
16         cout<<' ';
17     }
18     int b[100];
19     memset(b,0,sizeof(b));
20     for(int i=0;i<=99;i++)
21     {
22         cout<<b[1];
23         if(b[i]%5==4)
24         cout<<endl;
25         else
26         cout<<' ';
27     }
28     return 0;
29 }

 

posted on 2018-06-12 11:43  tjtzgby  阅读(197)  评论(0编辑  收藏  举报

导航