Computer Science, asked by chavanprem005, 3 days ago

write a program to find addition of first 10 numbers using for loop​

Answers

Answered by chandanisingh1511
1

Using while Loop

1. #include <stdio.h>

2. #include <conio.h>

3. void main()

4. { 5. int num, i, sum = 0; // initialize and declare the local variables.

6. printf("Enter a positive number : ");

7. scanf("%d", &num); // take a value up to which find the sum of n natural number.

8. i = 0;

Similar questions