SOLUTION OF URI 1154 URI SOLUTIONS No comments // 1154 (Mahmud_Jamil) BRUR // Ages #include <stdio.h>int main(){ int a,b=0; double c,d=0; while(1) { scanf("%d", &a); if(a<0) break; else { b+=a; d++; } } c=b/d; printf("%.2lf\n",c); return 0;} Share This: Facebook Twitter Google+ Stumble Digg Email ThisBlogThis!Share to XShare to Facebook
0 comments:
Post a Comment