0

Out put not accurate

Help me!!!!!

12th Sep 2022, 7:54 AM
Mohoshin Shihab
Mohoshin Shihab - avatar
3 ответов
+ 3
https://code.sololearn.com/cioWFrRbzwEL/?ref=app there were several mistmatched {} in your code properly formatting code can help you rectify it You can out your code in code playground
12th Sep 2022, 8:10 AM
Prashanth Kumar
Prashanth Kumar - avatar
+ 2
Next time please use the post tags to indicate relevant programming language and/or other context ... https://code.sololearn.com/W3uiji9X28C1/?ref=app
12th Sep 2022, 10:55 AM
Ipang
0
#include <stdio.h> int main() { int a[5], even_sum=0, odd_sum=0,i; for (i=0; i<5; i++){{ scanf("%d\n",&a[i]);} printf ("valuesbof array:\n "); for (i=0; i<5; i++){ printf ("%d\n",a[i]); if(a[i]%2==0) even_sum =even_sum+a[i]; else odd_sum =odd_sum+a[i];} printf ("%d\n",odd_sum ); printf ("%d\n",even_sum);} return 0;}
12th Sep 2022, 7:59 AM
Mohoshin Shihab
Mohoshin Shihab - avatar