陣列-學生學號_2121119-3  

該題使用陣列及for 

#include<iostream>
using namespace std;
int main()
{
int seat[50];
cout<<"本班學生學號:"<<endl;
for(int i=0;i<50;i++)
{
seat[i]=i+1; //set[0]為1號;seat[1]為2號...
cout<<"10100"<<seat[i]<<"\t";
}
cout<<endl;
system("pause");
return 0;
}

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 hfnkiki 的頭像
    hfnkiki

    我要勇敢地追逐我的世界.我的夢...

    hfnkiki 發表在 痞客邦 留言(0) 人氣()