#include <iostream>
using namespace std;
int main(int argc , char * argv[] )
{
//判断字符是否为数字字符
/* int num = 'a' ;
bool ret = num >= '1' && num <= '9';
cout << ret <<endl;
*/
/*
//判断字符是否为大写字母
int ch = 'F';
bool ret = ch >= 'A' && ch <= 'Z';
cout << ret << endl;
*/
//判断字符是否为小写字母
/*
int ch = 'r' ;
bool ret = ch >= 'a' && ch <= 'z';
cout << ret << endl;
*/
//判断字符是否为英文字母
/* int ch = '1';
bool ret = ch >= 'a' && ch <= 'z' || ch >= 'A' && ch <= 'Z';
cout << ret << endl;
*/
// 润年判断 :可以被4证除,但是不能被100证除,或者可以被400证除。
/*
int year = 4000 ;
bool ret = year % 4 == 0 && year % 100 != 0 || year %400 ==0;
cout << ret << endl;
*/
}
#include <iostream>
using namespace std;
int main(int argc , char * argv [])
{
/*
if(条件判断,要求提供数据为 bool类型 0 or 1)
{
if 满足条件执行目标语句体
}
int mon = -90;
if (mon > 5)
{
cout << "成功" << endl;
}
cout <<"错误" << endl;
return 0;
// if else 分级
int cake = 5 ;
int people = 0;
cout << "输入人数:" << endl;
cin >> people ;
if(cake >= people)
{
cout << "分配足够" << endl;
}else
{
cout << "库存不足!!!" << endl;
}
return 0;
int num = 0;
cout << "检测等级:" << endl;
cin >> num ;
if(num == 100 )
{
cout << "斗帝" << endl;
}else if(num >= 90 && num <= 99 )
{
cout << "斗圣" << endl;
}else if (num >=80 && num <=89)
{
cout << "斗尊" << endl;
}else if (num <= 79 && num >=1 )
{
cout << "还需努力修炼" << endl;
}else
{
cout << "普通人" <<endl;
}
*/
cout << "点歌" << endl;
cout << "1:周杰伦" << endl;
cout << "2:陈奕迅" << endl;
cout << "3:汪峰" << endl;
cout << "4:李健" << endl;
cout << "5:胡歌" << endl;
int choose = 0;
cin >> choose ;
switch (choose)
{
case 1:
cout << "请支付:11 RMB" << endl;
break;
case 2:
cout << "请支付:6 RMB" << endl;
break;
case 3:
cout << "请支付:7 RMB" << endl;
break;
case 4:
cout << "请支付:14 RMB" << endl;
break;
case 5:
cout << "请支付:19 RMB" << endl;
break;
default:
cout << "不在曲库中" << endl;
break;
}
}