Question: Write a C program to find the sum of odd and even numbers from 1 to N. Below are two possible demos. $ a.out Enter
Write a C program to find the sum of odd and even numbers from 1 to N. Below are two possible demos.
$ a.out
Enter the value of
num: 10
Sum of all odd
numbers = 25
Sum of all even numbers = 30
$ a.out
Enter the value of
num: 100
Sum of all odd
numbers = 2500
Sum of all even numbers = 2550
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
