- Declare An Integer Array That Can Hold Up To 10 Integer Values In A For Loop Initialize The Integer Array With The Fir 1 (37.04 KiB) Viewed 62 times
Declare an integer array that can hold up to 10 integer values. In a for loop, initialize the integer array with the fir
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Declare an integer array that can hold up to 10 integer values. In a for loop, initialize the integer array with the fir
Declare an integer array that can hold up to 10 integer values. In a for loop, initialize the integer array with the first 10 natural numbers (excluding 0). Integer 1 at index 0, integer 2 at index 1 and so forth. In a second for loop, compute the cumulative sum of the first 10 natural numbers and store it in a variable called sum. Display a message with the sum of the first 10 natural numbers using printf. Compile the program and rename the executable as sum.