c program to add n numbers
This c program add n numbers which will be entered by the user. Firstly user will enter a number indicating how many numbers user wishes to add and then user will enter n numbers. In the first c program to add numbers we are not using an array, and using array in the second code.
C programming code
Output of program:
Enter two number of integers you want to add 5
enter 5 numbers
1
2
3
4
5
sum of entered numbers = 15
No comments:
Post a Comment