C program to find the difference between sum of even and sum of odd digits in a number
Answers
Answered by
3
The program output is also shown below.
int i, num, odd_sum = 0, even_sum = 0;
printf("Enter the value of num\n");
scanf("%d", &num);
for (i = 1; i <= num; i++)
if (i % 2 == 0)
even_sum = even_sum + i;
odd_sum = odd_sum + i;
printf("Sum of all odd numbers = %d\n", odd-numbered.
PLEASE MAKE ME AS A BRAINLIST ANSWER
Answered by
0
Explanation:
56
hahhhhsujhenbsunsbhjamha
Similar questions