GoDaddy

£5.49 .COMs. from Go Daddy! -468x60

Sunday, April 1, 2012

Flow chart and program that takes two integers from user and print which one is smallest


      Draw    flowchart and write a  program that take two integers from user and print which one is smallest in the following format.
Sample input: Enter any two numbers:
33
58
Sample output: Greater number  is 58.
Hint: use if else.

#include
#include
void main()
{
 int a,b;                                               
 clrscr();
 printf("Enter any two numbers:");
 scanf("%d %d",&a,&b);
 if(a
  printf("%d is smallest..",a);
 else
  printf("%d is smallest..",b);
 getche();
}


No comments:

Post a Comment

You might also like:

Related Posts with Thumbnails