Computer Science, asked by 000Shubham000, 2 months ago

Write a program to print the sum of the even digits of an entered number?​

Answers

Answered by Varun3280V
2

Answer:

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_sum);

Explanation:

plz follow me and mark as brainliest....And hope it helps you.

Answered by rajputmaitreyei1917
1

use autosum to add the numbers or

ex- =A1+B1+ enter

or =A1:G1+ enter

Similar questions