Demonstrate IF with multiline body - C++ Statement

C++ examples for Statement:if

Description

Demonstrate IF with multiline body

Demo Code

#include <iostream>
using namespace std;
int main()/*from  w ww  .j a v  a  2  s  .  c om*/
{
   int x;
   cout << "Enter a number: ";
   cin >> x;
   if( x > 100 )
   {
      cout << "The number " << x;
      cout << " is greater than 100\n";
   }
   return 0;
}

Result


Related Tutorials