Computer Science, asked by aara1690, 8 months ago

Algorithm to compute the sum of odd numbers up to a given number. step by step

Answers

Answered by gauravarduino
0

Explanation:

C Program to Calculate the Sum of Odd & Even Numbers. Take the number N upto which we have to find the sum as input. Using for loop take the elements one by one from 1 to N. Using if,else statements separate the element as even or odd. Add the even and odd numbers separately and store it in different variables.

Similar questions