Demonstrate IF statement - C++ Statement

C++ examples for Statement:if

Description

Demonstrate IF statement

Demo Code

#include <iostream>
using namespace std;
int main()/* w  w w  .  ja va 2  s . c  o m*/
{
   int x;
   cout << "Enter a number: ";
   cin >> x;
   if( x > 100 )
      cout << "That number is greater than 100\n";
   return 0;
}

Result


Related Tutorials