Fri Feb 23 2024 08:32:28 GMT+0000 (Coordinated Universal Time)
Saved by @NoobAl
#include <stdio.h> int main (void){ int i, h, n, s=0; double d; scanf ("%d", &h); for (i=0; i<h; i++){ scanf ("%d", &n); s=s+n; } d = (double) s; printf ("%.2lf", d/h); return 0; }
Copy this HTML code:
Preview:
open_in_newInstructions on embedding in Medium
Comments