Semester : S1 and S2
Subject : Computer Programming
Year : 2017
Term : DECEMBER
Branch : BIOTECHNOLOGY
Scheme : 2015 Full Time
Course Code : CS 100
Page:5
printf("Enter any 2 values");
scanf("%d%d",&a,&b);
max=a;
if(max< b)
max =b;
printf("max =%d",max);
getch();
2)If-else statement
It is an extension of simple if statement.
Syntax:
if(test expression)
True block statement ;
else
false block statement;
Statement-x;
If test expression is true, then the true block statement, immediately following the if statement are executed ;
otherwise the false block statement () are executed . In either case , either true-block(or) false block will be
executed,