You are viewing a single comment's thread. Return to all comments →
my code is
int main() { int n,i,j=3,k=2,p=1; float a,b,c; scanf("%d",&n); int arr[n]; for( i = 0; i < n; i++) { scanf("%d",&arr[i]); } for(i=0;i
} else if(arr[i]>0) { k++; } else if(arr[i]==0) { p++; } } a=k/n; b=j/n; c=p/n; printf("%f\n%f\n%f",a,b,c); return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
Plus Minus
You are viewing a single comment's thread. Return to all comments →
my code is
include
include
include
include
include
include
include
int main() { int n,i,j=3,k=2,p=1; float a,b,c; scanf("%d",&n); int arr[n]; for( i = 0; i < n; i++) { scanf("%d",&arr[i]); } for(i=0;i
}