Semester : S1 and S2
Subject : Computer Programming
Year : 2017
Term : DECEMBER
Branch : BIOTECHNOLOGY
Scheme : 2015 Full Time
Course Code : CS 100
Page:6
not both.
ext expression
True block statement
false block statement
Stmt-x
Example:To check whether given no is even (or) odd
main()
{int
n:
clrscr();
printf("enter any number");
scanf("%d", &n);
if(n%2==0)
printf("even number is even");
else
printf("Given nmber is odd");
getch();
3.Nested if---else statement:
When a series of decision are involved, we may to have to use more than if-----else statement in nested form as
follows:
if(test condition)
if(test condition)
Statement-1;