home
Learn
screen_rotation
#include <stdio.h> #include <conio.h> void main(){ int m; int n; int p; clrscr(); printf("\n This is a nested if() else statement program."); printf("\n Enter value of m: "); scanf("%d",&m); printf("\n Enter value of n: "); scanf("%d",&n); printf("\n Enter value of p: "); scanf("%d",&p); if(m > 100){ if(n > 75){ if(p > 50){ printf("\n HELLO WORLD "); } } } else{ if(m < 100){ if(n < 75){ if(p < 50){ printf("\n HELLO FRIENDS "); } } } } getch(); }
Program Output
This is a nested if() else statement program. Enter value of m: 10 Enter value of n: 20 Enter value of p: 30 HELLO FRIENDS