fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. char city[49];
  5. int pop;
  6. int tot=0;
  7. int avg;
  8.  
  9. for(int i=0; i<3; i++){
  10. scanf("%s %d", &city, &pop);
  11. tot += pop;
  12. }
  13. printf("%d \n", pop);
  14.  
  15. avg = avg/3;
  16. printf("%d", pop);
  17. return 0;
  18. }
  19.  
  20.  
Success #stdin #stdout 0s 5284KB
stdin
city 12478
stdout
12478 
12478