Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main (){
- int dist,soma=0,i;
- double r;
- char nome[200];
- while (scanf(" %[^\n]",nome) != EOF){
- scanf("%d",&dist);
- soma +=dist;
- i++;
- }
- r = soma/i;
- printf("%.1lf\n",r);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement