#include <iostream>
using namespace std;
int main()
{
int i;
cout<<"type a number and 'Enter'"<<endl;
cin>>i;
if(i>5)
cout << "It's greater than 5" <<endl;
else
if(i<5)
cout << "It's less than 5" <<endl;
else
cout << "It's equal to 5 " <<endl;
cout <<"type a number and 'Enter'"<<endl;
cin>>i;
if(i<10)
if(i>5)
cout<<"5<i<10"<<endl;
else
cout<<"i<=5"<<endl;
else
cout<<"i>=10"<<endl;
}
3.2.2 ifthen
最新推荐文章于 2024-02-19 11:22:26 发布