Monday, September 27, 2010

Flowchart for calculattes the sum of two numbers

1. Use terminal symbols to indicate the start of a flowchart . Write start , begin , etc in the symbol
2.Use input/output symbols for reading and displaying of data values .
3.Use processing symbol for calculations
4.Use terminal symbol to indicate the end of flowchart .Write end , stop , etc in the symbol .




-Prompt and read the 1st number from user .
-Prompt and read 2nd number from user
-Calculate the sum
-Display the sum


#include

int main (void)
{
int number 1 , number 2, sum;

printf ("Enter 1st number > ") ;
scanf ( "%d", &number1);

printf ("Enter 2nd number > " ) ;
scanf ("%d" , &number2);

sum = number1 + numbers2;

printf ("Result = %d\n",sum);

return 0;

No comments:

Post a Comment