Friday, 9 May 2014

SIMPLE IF STATEMENT IN C PROGRAM

SIMPLE IF STATEMENT IN C PROGRAM

#inlcude<stdio.h>   //header file stdio.h
#include<conio.h> //header file conio.h
main()                              //main function
{                                       //start of the program
int a,b;                                //variable declaration
clrscr();        //clrscr function use to clear the previous output screen
printf("enter the values of a and b");
scanf("%d%d",&a,&b);      //reading values from user
if(a==b)                //if statement works only condition is true 
{
printf("the values of a and b is equal");
}
getch();
}                           //end of the program

No comments:

Post a Comment