- 分享
- 0
- 人气
- 0
- 主题
- 11
- 帖子
- 370
- UID
- 511120
- 积分
- 229
- 阅读权限
- 14
- 注册时间
- 2012-7-23
- 最后登录
- 2014-1-24
- 在线时间
- 2157 小时
|
小暗 发表于 2013-3-27 03:53 PM
我是学C的~.~虽然不知道怎么打~不过你可以试看看这个logic~
我试看看用C++~
char ans;
谢谢你了!
#include<iostream>
using namespace std;
int main()
{
double number=0;
double total=0;
double member;
char yn;
do
{cout<<"BODY TREATMENT"<<endl;
cout<<"=============================================================="<<"\n";
cout<<"TREATMENTS PRICES"<<"\n\n";
cout<<"1. HERBAL BATH RM 200"<<"\n\n";
cout<<"2. TRADITIONAL MASSAGE RM 110(60 Minutes)"<<"\n\n";
cout<<"3. TRADITIONAL MASSAGE RM 150(90 Minutes)"<<"\n\n";
cout<<"4. TRADITIONAL MASSAGE RM 190(120 Minutes)"<<"\n\n";
cout<<"5. TRADITIONAL AROTHERAPY MASSAGE RM 130(60 Minutes)"<<"\n\n";
cout<<"6. TRADITIONAL AROTHERAPY MASSAGE RM 170(90 Minutes)"<<"\n\n";
cout<<"7. TRADITIONAL AROTHERAPY MASSAGE RM 210(120 Minutes)"<<"\n\n";
cout<<"==============================================================="<<"\n\n\n";
cout<<"Hair Treatment"<<endl;
cout<<"TREATMENT PRICES"<<"\n\n";
cout<<"8. HAIR CUT RM 35"<<"\n\n";
cout<<"9. SHAMPOO & BLOW RM 28(Long)"<<"\n\n";
cout<<"10. SHAMPOO & BLOW RM 20(SHort)"<<"\n\n";
cout<<"11. COLORING RM 110(Long)"<<"\n\n";
cout<<"12. COLORING RM 95(Short)"<<"\n\n";
cout<<"13. HAIR SPA RM 220(Long)"<<"\n";
cout<<"*(Wash,hair mask, wash scalp massage with cream,steam shoulder scrub and massage, hair tonic & blow dry)"<<"\n\n";
cout<<"14. HAIR SPA RM 180(Short)"<<"\n";
cout<<"*(Wash,hair mask, wash scalp massage with cream,steam shoulder scrub and massage, hair tonic & blow dry)"<<"\n\n";
cout<<"============================================================"<<"\n\n\n";
cout<<"PLEASE ENTER BODY/HAIR STREATMENT NUMBER:"<<"\n";
cin>>number;
cout<<"TOTAL:"<<number<<"\n\n";
if(number==1)
total=total+200;
else
if(number==2)
total=total+110;
else
if(number==3)
total=total+150;
else
if(number==4)
total=total+190;
else
if(number==5)
total=total+130;
else
if(number==6)
total=total+170;
else
if(number==7)
total=total+210;
else
if(number==8)
total=total+35;
else
if(number==9)
total=total+28;
else
if(number==10)
total=total+20;
else
if(number==11)
total=total+110;
else
if(number==12)
total=total+95;
else
if(number==13)
total=total+220;
else
if(number==14)
total=total+180;
else
cout<<"ERROR.\n\n\n";
char yesNO;
cout<<"MEMBER: (y/n)"<<"\n";
cin>>yesNO;
if(yesNO=='y')
{
total=total-(total*0.25);
}
cout<<"TOTAL AMOUNT: RM "<<total<<"\n\n\n";
char ans;
do
{
//your Bill System
cout<< "Do you want to continue the next Bill (Y/N)?\n";
cin>>ans;
while((ans !='Y')&&(ans !='y'));
return 0;
}
c:\users\user\documents\visual studio 2010\projects\assignment\assignment\auto billing system.cpp(101): fatal error C1075: end of file found before the left brace '{' at 'c:\users\user\documents\visual studio 2010\projects\assignment\assignment\auto billing system.cpp(10)' was matched
1>
1>Build FAILED.
帮我看看 "{" 哪里错了 |
|