a program in c programming language  to print the sum of all odd numbers and even numbersbetween two given numbers using a while loop.

Output
Enter the Starting and Ending number
1
10
Sum of all odd numbers between 1 and 10=25
Sum of all even numbers between 1 and 10=30


Explanation
1.The user must first enter the number he wants to find the sum of which is stored in variables n1 and n2.
2.Using the for loop, get the elements n1 to n2 one by one.
3.Use the if, else statement for each element to find out whether it is odd or even by dividing the element by 2.
4.Initialize the even_sum and odd_sum to value zero.
5.If the element is even, increment the Even_sum variable by the current element.
6.If the element is odd, increment the odd_sum variable by the current element.
7.show the odd_sum and even_sum variables separately and exit.


Previous :-->> 10. Write a program in c to check if a given number is a perfect square or not using a while loop or do while loop.
 -->> NEXT: 12.Write a program in c to check if a given number is a strong number or not using a while loop.
-->>ALL Loops Assignments in c