Computer Science, asked by rastogianubhuti911, 4 months ago

write a program to enter 10 numbers from user and display sum of all even numbers.​

Answers

Answered by simran070907
2

Explanation:

The program output is also shown below.

  • The program output is also shown below.int i, num, odd_sum = 0, even_sum = 0;
  • The program output is also shown below.int i, num, odd_sum = 0, even_sum = 0;printf("Enter the value of num\n");
  • 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);
  • 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++)
  • 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)
  • 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;
  • 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;
  • 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);

HOPE IT HELPS U ❤️

MARK ME AS BRAINLIEST ❤️

Similar questions