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?
5733 visits
Outline:Nested if और switch स्टेटमेंट -Nested if स्टेटमेंट -Switch स्टेटमेंट - nested-if स्टेटमेंट के लिए रचनाक्रम -switch स्टेटमेंट के लिए रचनाक्रम -break स्टेटमेंट -nested if-else और switch स्टेटमेंट के मध्य तुलना
Nested if और switch स्टेटमेंट -Nested if स्टेटमेंट -Switch स्टेटमेंट - nested-if स्टेटमेंट के लिए रचनाक्रम -switch स्टेटमेंट के लिए रचनाक्रम -break स्टेटमेंट -nested if-else और switch स्टेटमेंट के मध्य तुलना
Show video info
Pre-requisite