Advertisement
NAHID_GTC

Untitled

Jan 19th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. include <stdio.h>
  2. int main()
  3. {
  4. int a[5] = {95,85,65,79,83};
  5. int b[5] = {45,98,58,35.95};
  6. int c[5] = {86,83,49,90,81};
  7. double d[5];
  8.  
  9. int i, j;
  10.  
  11. for(i = 0; i <= 4; i++) {
  12. d[i] = a[i]/4.0 + b[i]/4.0 + c[i]/2.0;
  13. }
  14.  
  15.  
  16. for(i = 0; i <= 4; i++) {
  17. printf("%d th boy got: %0.1f\n", i+1, b[i]);
  18. }
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement