GoDaddy

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

Sunday, April 1, 2012

C Program and Flow chart that take three numbers from user and print Sum

1.      Draw a  flowchart and  write a program which take three numbers from user and then print their sum in the following format.
Sample input: Enter any three numbers:
21
13
35
           Sample input: sum is 69.

#include
#include
void main()
{
  int a,b,c,sum;
  clrscr();
  sum=0;
  printf("Please Enter THREE numbers:");
  scanf("%d %d %d",&a,&b,&c);
  sum=a+b+c;
  printf("\nSUM is %d",sum);
  getche();
}

Flow chart
 

No comments:

Post a Comment

You might also like:

Related Posts with Thumbnails