0
Out put not accurate
Help me!!!!!
3 Answers
+ 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
+ 2
Next time please use the post tags to indicate relevant programming language and/or other context ...
https://code.sololearn.com/W3uiji9X28C1/?ref=app
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;}