what is wrong in my code?

Revision en1, by nishanth.molleti9, 2019-06-19 13:08:41

Below is my code to the problem named taxi . I will also attach the link of the problem . Let me know where does my code break. https://codeforces.com/problemset/problem/158/B

my code in C language :-

include<stdio.h>

main() { float c; int n, a[100],i ,sum=0 ,d,e=0,f=0; scanf("%d",&n); if(1<n<100000) {

for(i=0;i<n;i++)
    scanf("%d",&a[i]);
for(i=0;i<n;i++)
{
    sum=sum+a[i];

}

// printf("%d\n",sum); c=sum/4; // printf("%f",c); d= fmod(sum,4); //printf("%d\n",d); if(d != 0) { e=c+1; printf("%d",e); } else if(d == 0) { f=c; printf("%d",f); } }

}

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English nishanth.molleti9 2019-06-19 13:08:41 746 Initial revision (published)