4章10节输入一个大于一百小于十的数字

来源:互联网 发布:绝牛网身份证查询软件 编辑:程序博客网 时间:2024/05/18 15:55

#include <iostream>
int main()
{
 using namespace std;
 int x;
 cout << "pls enter a number less than 10 or bigger than 100" << endl;
 cin >> x;
  if (x >=10)
  {
   if(x>100)
    cout << "thanks you had enter a number bigger than 100" << endl;
   else
    cout << "sorry pls enter a number less than 10 or bigger than 100" << endl;
  }
  else
   cout << "you had enter a number less than 10"  << endl;
return 0;
}

原创粉丝点击