But it is not an nested if program.It is a ladder if.
A)Write a program to check whether the age of the employee is between 20 and 60? B) Write a program to check whether the age of the employee is between 20 and 59? Here, I mentioned two questions.Which one is correct?We cant able to write program to the Question A?In the tutorial also asked the students to write coding for A? B) Write a program to check whether the age of the employee is between 20 and 59?CODING:-#include<stdio.h>int main(){ int a; printf("Enter the age of a employee between 20 to 59"); scanf("%d",&a); if((a/10)==5){ printf(" AGE RANGE BETWEEN 50 to 59");} else if((a/10)==3){ printf(" AGE RANGE BETWEEN 30 to 49");}else if((a/10)==2){ printf(" AGE RANGE BETWEEN 20 to 29");}else{printf("AGE NOT IN RANGE\n");}return 0;}
Write a program to check whether the age of the employee is between 20 and 60? Is the above question correct? Write a program to check whether the age of the employee is between 20 and 59? Or this one
COMPARE TO SWITCH AND IF ELSE, which statement is more often used in real time programming
Nested if else is used specially in which type of program ?
What are conditional statements?
761 visits
Outline:नेस्टेड इफ र स्विच स्टेटमेन्ट -नेस्टेड इफ स्टेटमेन्ट - स्विच स्टेटमेन्ट -नेस्टेड इफ स्टेटमेन्टको सिनट्याक्स -स्विच स्टेटमेन्टको सिनट्याक्स -ब्रेक स्टेटमेन्ट -नेस्टेड एल्स-इफ र स्विच स्टेटमेन्टको तुलना
नेस्टेड इफ र स्विच स्टेटमेन्ट -नेस्टेड इफ स्टेटमेन्ट - स्विच स्टेटमेन्ट -नेस्टेड इफ स्टेटमेन्टको सिनट्याक्स -स्विच स्टेटमेन्टको सिनट्याक्स -ब्रेक स्टेटमेन्ट -नेस्टेड एल्स-इफ र स्विच स्टेटमेन्टको तुलना
Show video info
Pre-requisite