標題:
購物系統 (一)
[打印本頁]
作者:
張翼安
時間:
2016-3-18 22:09
標題:
購物系統 (一)
運用陣列技巧, 設計一購物系統的商品價目表, 商店名與商品請同學們發揮創意自由發揮.
作者:
蔡庭豪
時間:
2016-4-16 11:45
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
string number[7]={"450","550","325","200","660","150","380"};
string name[7]={"遙控汽車","飛機模型","足球","拼圖","玩具gun","可愛玩偶","籃球"};
cout<<"======================================"<<endl;
cout<<"===智障玩具店========================="<<endl;
cout<<"......................................"<<endl;
cout<<"===商品價目表========================="<<endl;
for(int i=0;i<7;i++)
{
cout<<"("<<i+1<<")"<<name[i]<<" "<<"\t"<<number[i]<<"元"<<endl;
}
cout<<endl;
system("pause");
return 0;
}
複製代碼
作者:
張健勳
時間:
2016-4-16 11:59
#include<iostream>
using namespace std;
int main ()
{
cout<<"☆★☆《影武的網路商城》☆★☆"<<endl;
cout<<endl;
cout<<"〔商品價目表〕"<<endl;
string list[7]={"Grand Theft Auto 5","H1Z1","Rust","Minecraft","Minecraft stroy:mode","CS:GO","garry's mod"};
int money[7]={1600,876,328,810,562,528,328};
for ( int i=0 ; i<7 ; i++)
{
cout<<"("<<i+1<<")"<<list[i]<<""<<"\t"<<money[i]<<"元"<<endl;
}
cout<<endl;
system("pause");
return 0;
}
複製代碼
作者:
吳承勳
時間:
2016-4-16 12:02
本帖最後由 吳承勳 於 2016-4-18 17:09 編輯
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int price[7]={790, 870, 110, 230, 950, 770, 375};
string name[7]={"遙控汽車","飛機模型","足球","拼圖","玩具槍","可愛玩偶","籃球"};
cout << "[商品價目表]" << endl;
for(int i = 0; i <= 6; i++)
{
cout << "(" << i+1 << ")" << name[i] << " " << "\t" << price[i] << "元" << endl;
}
system("pause");
return 0;
}
複製代碼
作者:
蔡季樺
時間:
2016-4-16 12:03
本帖最後由 蔡季樺 於 2016-4-20 13:26 編輯
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
string name[7]={"火焰藥水","放屁藥水","作夢藥水","打呵欠藥水","超人藥水","打老師藥水","萬能藥水"};
int money[7]={200,50,100,10,2000,1100,1000000000};
cout<<"~~★☆★沒路用的藥水專賣店☆★☆~~"<<endl;
cout<<"[價目表]"<<endl;
for(int i=0; i<=6; i++)
{
cout<<"("<<i+1<<")"<<name[i]<<"\t"<<money[i]<<"元"<<endl;
}
cout<<endl;
system("pause");
return 0;
}
複製代碼
作者:
張健勳
時間:
2016-4-23 10:58
#include<iostream>
using namespace std;
int main ()
{
cout<<"☆★☆《影武的網路速食店》☆★☆"<<endl;
cout<<endl;
cout<<"〔商品價目表〕"<<endl;
string list[7]={"薯條","漢堡","可樂","雪碧","奶昔","紅茶","披薩"};
int money[7]={50,80,45,45,55,45,299};
for ( int i=0 ; i<7 ; i++)
{
cout<<"("<<i+1<<")"<<list[i]<<""<<"\t"<<money[i]<<"元"<<endl;
}
cout<<endl;
system("pause");
return 0;
}
複製代碼
作者:
張文擇
時間:
2016-4-23 11:19
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
int price[7]={100000, 7470, 7410, 254, 8750, 87440, 9999999995};
string name[7]={"打罵因酒","拉屎餅乾","死掉藥水","屁","川普的屁","歐媽媽","串鋪川普"};
cout << "怪怪商店商品價目表" << endl;
for(int b = 0; b <= 6; b++)
{
cout << "(" << b+1 << ")" << name[b] << " " << "\t" << price[b] << "元" << endl;
}
system("pause");
return 0;
}
複製代碼
歡迎光臨 種子論壇 | 高雄市資訊培育協會學員討論區 (http://seed.istak.org.tw/)
Powered by Discuz! 7.2