Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int a,b,c,d;
- double f,r=0.0,s;
- scanf("%d",&a);
- if(a<=5)
- {
- for(b=1;b<=a;b++)
- {
- r=0.0;
- scanf("%d",&c);
- if(c<=8)
- {
- for(d=1;d<=c;d++)
- {
- scanf("%lf",&f);
- if(f>=2 && f<=4)
- {
- r+=f;
- s=r/c;
- }
- }
- }
- printf("Case %d: %.3lf\n",b,s);
- }
- }
- }
Add Comment
Please, Sign In to add comment