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
1

Expert's answer

2013-10-31T14:32:22-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS