or when you have blocks as:
Example
/* In this example you will see a demo of using the if-else combined statements
and a new header file. The header file used in this example is stdlib.h which
stands for standered library. A predefined function that is capable of
generating a random integer number the function used for this purpose is rand()
*/
#include <iostream.h>
#include <stdlib.h>
main ( )
{
int hope; // number generated by computer randomly
int guess;// number guessed by user
hope=rand(); // assign a random number to hope
cout << "Guess an integer number";
cin >> guess;
if(guess==hope)
{
cout << "Congratulation you are a winner n";
cout << "You have guessed correctly n";
}
else
{
cout << "Sorry, your guess is wrong";
cout << "Correct guess was t" << hope << endl;
}
return 0;
}