2075 6

CSC115 ยท 2075 ยท 5 marks

Write a program to calculate sum of first 10 odd numbers.

Write a program to calculate sum of first 10 odd numbers. [5]

C ProgrammingChapter 5: Control StatementDecision Making and Looping

The first 10 odd numbers are: 1, 3, 5, 7, 9, 11, 13, 15, 17, 19 We use a for loop to iterate through numbers and check whether each number is odd using the condition num % 2 != 0. We keep a count of how many odd numbers have been found and add them to the sum until the count reaches 10. --- --- -...