if-else
Example for if...else condition in[c-program]
#include< stdio.h > /* header file */
#include< conio.h > /* header file */
void main() /* main function start*/
{
int a=10,b=5; /*declaring a value*/
clrscr();
printf("the value of a is %d",a);
printf("\n the value of b is %d",b);
if(a>b) /* condition*/
{ /*true statement*/
printf("\n \n a is big and b is small\n");
}
else /*false statement*/
{
printf("\n \n b is big and a is small\n");
}
getch();
}
youtube tutorial
Comments
Post a Comment