Computer Science, asked by ATULYA3635, 1 year ago

Write a c program to find the sum of all even and odd numbers

Answers

Answered by PiyushSinghRajput1
3
Find the sum of odd numbers and sum of even numbers from 1 to N

#include <stdio.h> #include <conio.h>

void main() { ...

clrscr();

printf("Enter the value of N\n"); scanf ("%d", &N);

for (i=1; i <=N; i++) { ...

printf ("Sum of all odd numbers = %d\n", oddSum); ...

Enter the value of N. ...

RUN2.

Similar questions