网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
05月10日漏签0天
c++吧 关注:614,072贴子:2,110,525
  • 看贴

  • 图片

  • 吧主推荐

  • 游戏

  • 0回复贴,共1页
<<返回c++吧
>0< 加载中...

C++新手有疑问

  • 取消只看楼主
  • 收藏

  • 回复
  • 尤克虫虫
  • =
    2
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
#include<iostream>
using namespace std;
int main(int argc,char* argv[])
{
cout<<"欢迎使用托运行李系统"<<endl;
int fee;
int weight;
int number;
int cabin;
int health;
cout<<"请输入行李重量"<<endl;
cin>>weight;
if(weight<=30){
cout<<"恭喜您!您本次行李托运免费!"<<endl;
}
else(weight>30){
cout<<"国内旅客请输入1(Please input Num1 if you are Chinese)"<<endl;
cout<<"国际旅客请输入0(Please input Num0 if you are not Chinese)"<<endl;
cin>>number;
if(number==1){
cout<<"头等舱旅客请输入1"<<endl;
cout<<"非头等舱旅客请输入0"<<endl;
cin>>cabin;
if(cabin==1){
cout<<"残疾人旅客请输入1"<<endl;
cout<<"非残疾人旅客请输入0"<<endl;
cin>>health;
if(health==1){
weight=(weight-30)*2;
cout<<"您本次托运费为"<<weight<<endl;
}
else(health!=1){
fee=(weight-30)*4;
cout<<"您本次托运费为"<<fee<<endl;
}
}
else(cabin!=1){
cout<<"残疾人旅客请输入1"<<endl;
cout<<"非残疾人旅客请输入0"<<endl;
cin>>health;
if(health==1){
fee=(weight-30)*3;
cout<<"您本次托运费为"<<fee<<endl;
}
else(health!=1){
fee=(weight-30)*6;
cout<<"您本次托运费为"<<fee<<endl;
}
}
}
else(number!=1){
cout<<"头等舱旅客请输入1"<<endl;
cout<<"非头等舱旅客请输入0"<<endl;
cin>>cabin;
if(cabin==1){
cout<<"残疾人旅客请输入1"<<endl;
cout<<"非残疾人旅客请输入0"<<endl;
cin>>health;
if(health==1){
fee=(weight-30)*4;
cout<<"您本次托运费为"<<fee<<endl;
}
else(health!=1){
fee=(weight-30)*8;
cout<<"您本次托运费为"<<fee<<endl;
}
}
else(cabin!=1){
cout<<"残疾人旅客请输入1"<<endl;
cout<<"非残疾人旅客请输入0"<<endl;
cin>>health;
if(health==1){
fee=(weight-30)*6;
cout<<"您本次托运费为"<<fee<<endl;
}
else(health!=1){
fee=(weight-30)*12;
cout<<"您本次托运费为"<<fee<<endl;
}
}
}
}
}
求大神帮我看一下问题出在哪里。。


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 0回复贴,共1页
<<返回c++吧
分享到:
©2025 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示