1.

1. Design an algorithm to add 3 integers and output the result

Answer»

amming languageint main(){int a=20, b=5, c=5, sum;sum= a+b+c;     printf ("The sum of three NUMBERS is %d",sum);return 0;}Output:Sum of three numbers is 30Explanation:STEP 1: STARTstep2: take three numbers N1,N2 and N3step3: ADD the three number and STORE the result as sum.step4: PRINT the VALUE of sum.step5: STOP



Discussion

No Comment Found