is the weather good,
if yes
I will go out in the yard.
if No
"Oh sorry u can not go out sit indoors \n"
int main()
{
puts("this is just to test nested ifs \n");
char num0;
printf("press y for Yes and n for No \n");
printf("is the weather good \n");
scanf("%c",&num0);
if (num0 == 'y')
{
printf("Good u can go out now \n");
if(num0 == 'n')
printf("Oh sorry u can not go out sit indoors \n");
}
return 0;
}


Sign In
Create Account


Back to top









