Compound if statements

/*The program will demonstrate different ways to 
write if statements.*/
#include<iostream.h>//nessesary for cin and cout
#include<iomanip.h>//setw and setprecision
main()
{

int j = 3, k =7;
char ch = 'A';
float pi = 3.14;

//below is an if statement
if (j == 5)
  cout << "Hello\n";
else
  cout << "Goodbye\n";

/*below is a compound if statement. This
means more than one line of code can be
used in the TRUE or FALSE section*/
if (k < j)
{
  cout << "ABC\n";
  j = j + 1;
}
else
{
  cout << "XYZ\n";
  j = j + 2;
}


/*like the statements below, 
if statements do not need an else section*/
if (ch != 'B') 
{
  cout << "Hey!\n";
  cout << j << '\n';
}

/*An if statement will only execute
the line immediately after the if part
unless there are braces.*/
if (pi > 3.1415) 
cout << "Wow!\n";
cout << setw(5) << setprecision(2) << pi;

return 0;

}
/*
Goodbye
XYZ
Hey!
5
3.1
*/