give me a programme on nested if
anuj:
was it for c++ OR JAVA
Answers
Answered by
1
heya friend,
Nested is kind of confusing but not that much tough when once we learn to write the program
there can be many programs related to it
WAP to check whether the entered year is a leap year or not?
[Leap Years are any year that can be evenly divided by 4. A year that is evenly divisible by 100 is a leap year only if it is also evenly divisible by 400.]
hope it helped!!
Nested is kind of confusing but not that much tough when once we learn to write the program
there can be many programs related to it
WAP to check whether the entered year is a leap year or not?
[Leap Years are any year that can be evenly divided by 4. A year that is evenly divisible by 100 is a leap year only if it is also evenly divisible by 400.]
hope it helped!!
Answered by
1
suppose u want to write a C language program such tht if input no. is positive or not if it is positive it is even or not
#include <stdio.h>
int main( )
{
int x;
scanf("%d",&x);
if(x>0)
{
printf("it is positive no.");
if(x%2==0)
{
printf("it is even positive no.");
}
}
return 0;
}
#include <stdio.h>
int main( )
{
int x;
scanf("%d",&x);
if(x>0)
{
printf("it is positive no.");
if(x%2==0)
{
printf("it is even positive no.");
}
}
return 0;
}
Similar questions
Geography,
8 months ago
English,
8 months ago
CBSE BOARD XII,
8 months ago
Math,
1 year ago
English,
1 year ago