string num [8][3]={{" ","[玩具價目表]"," "},{"<1>","遙控車","450元"},{"<2>","飛機模型","100元"},{"<3>","足球","100元"},{"<4>","拼圖","100元"},{"<5>","狙擊槍","100元"},{"<6>","恰吉","150元"},{"<7>","籃球","450元"}};
cout<<"☆★☆智能玩具店☆★☆"<<endl;
cout<<" "<<endl;
for( int i=0; i<8; i++)
{
for( int j=0; j<3; j++)
{
cout<< num[i][j]<<"\t";
}
cout<<endl;
}
system("pause");
return 0;
}
複製代碼
作者: 黃安立 時間: 2018-3-10 14:29
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
cout<<"智能玩具店"<<endl;
string name [7]={"遙控汽車","遙控飛機","足球","評圖","玩具槍","可愛玩偶","籃球"};
int num[7]={450,550,325,200,660,150,380,};
for (int i=0;i<7;i++)
{
cout<<name[i];
cout<<num[i]<<endl;
cout<<endl;
}
system("pause");
return 0;
}
複製代碼
作者: 黃安立 時間: 2018-3-10 15:06
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
cout<<"智能玩具店"<<endl;
string name [7]={"(1)遙控汽車","(2)遙控飛機","(3)足球","(4)評圖","(5)玩具槍","(6)可愛玩偶","(7)籃球"};