c++ 数组

c++ 数组

#include 
using namespace std;

#include 
using std:: setw;


int main()

{
  int n[10];

  //初始化数组元素
  for (int i=0;i<10;i++)
      {
       n[i]=i+100;

       }
  cout << "element" << setw(13) <<"value" <
element        value
      0          100
      1          101
      2          102
      3          103
      4          104
      5          105
      6          106
      7          107
      8          108
      9          109

posted on 2019-03-13 12:28 luoganttcc 阅读(...) 评论(...) 编辑 收藏

你可能感兴趣的:(c++ 数组)