To check the age and given the marks are not in c programming
#include<stdio.h>
#include<conio.h>
int main()
{
int age,marks;
printf("enter your age\n");
scanf ("%d",&age);
printf("enter your marks\n");
scanf("%d",&marks);
switch(age)
{
case 3:
printf("the age is 3\n");
switch(marks)
{
case 45:
printf("your marks are 45");
break;
default:
printf("your marks are not 45");
}
break;
}
return 0;
}
Output:enter your age
3
enter your marks
45
the age is 3
your marks are 45
Thank you sir
ReplyDelete