if-else Condition
It is used for comparision between only
two variables.
syntax:-
if(condition)
{
statements;
}
else
{
statements;
}
Example:-
#include<stdio.h>
main()
{
int a,b;
clrscr();
printf("enter a,b values:");
scanf("%d%d",&a,&b);
if(a>b)
printf("a is big");
else
printf("b is big");
getch();
}
output:-
0 comments:
Post a Comment