Friday, December 14, 2007
6. Write a C program to find the sum of odd numbers and the sum of even numbers from 1 to N. Output the computed sums on 2 different lines with suitable messages.
/* Sum of even and odd numbers*/
printf("\nEnter value of N\n");
printf("\nSum of even numbers=%d\n\a",es);
printf("\nSum of odd numbers=%d\n\a",os);