C++ Primer(第五版)练习3.31

来源:互联网 发布:彩虹代刷网源码 编辑:程序博客网 时间:2024/05/29 08:54

很简单的一个小代码,用了for循环和范围for

#include <iostream>#include <string>#include <vector>using namespace std;int main() {int a[10] = {};for (int i = 0; i < 10; i++)a[i] = i;for (auto c : a)cout << c << " ";cout << endl;system("pause");return 0;}


0 0
原创粉丝点击