Thursday, January 20, 2011

Constants, Variables and Data types

The program which illustrates the use of scanf function.
#include<stdio.h>
void main()
{
int number;
printf("Enter an integer number\n");
scanf ("%d", &number);
if ( number < 100 )
printf("Your number is smaller than 100\n\n");
else
printf("Your number contains more than two digits\n");
getch();
}

No comments:

Post a Comment