What will the following program print nesting if into while loop? - C Statement

C examples for Statement:while

Description

What will the following program print nesting if into while loop?

Demo Code

#include <stdio.h> 
int main(void) 
{ 
   int age = 20; 
   while (age++ <= 65) 
   { //from  w ww. j  a  v  a 2s  .  c  o m
      if (( age % 20) == 0) /* is age divisible by 20? */ 
          printf("You are %d. Here is a raise.\n", age); 
      if (age = 65) 
          printf("You are %d. Here is your gold watch.\n", age); 
   } 
   return 0; 
}

Result


Related Tutorials