Question
Write a for loop that will produce each of thefollowing sequences: a. 6, 8, 10, 12,.......66 b. 7, 9, 11, 13,........67 c. The sum of the numbers between 1and 15 inclusive d. The sum of the odd numbers between 15and 45 inclusive e. The first 50 numbers in the series 1, 4,7, 10.....(calculate the total 1+4+7+10+......) Write a for loop that will produce each of thefollowing sequences: a. 6, 8, 10, 12,.......66 b. 7, 9, 11, 13,........67 c. The sum of the numbers between 1and 15 inclusive d. The sum of the odd numbers between 15and 45 inclusive e. The first 50 numbers in the series 1, 4,7, 10.....(calculate the total 1+4+7+10+......)
Explanation / Answer
In for loops there exists a beginning, and end, and an incrementvalue: int i; for (i = begin; i