Question #36559

enter a number it is greater than 100 print A when it is less than 100 print C and if it is equal 100 print B

Expert's answer

#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
    int number;
    cin >> number;
    if(number > 100)
        cout << "A" << endl;
    else if(number < 100)
        cout << "C" << endl;
    else
        cout << "B" << endl;
    cin.get(); //for pause
    cin.get(); //
    return 0;
}
LATEST TUTORIALS
APPROVED BY CLIENTS