SHARE
TWEET

1.4 Просек

Mihajlo_K Mar 17th, 2019 (edited) 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //Да се напише програма која пресметува просечна оцена во семестар. Програмата чита 5 цели броја. Треба да се испечати еден реален број на две децимали, просек на прочитаните броеви.
  2.  
  3. #include <stdio.h>
  4. int main()
  5. {
  6.     int a, b, c, d, f;
  7.     float prosek;
  8.     scanf("%d %d %d %d %d", &a, &b, &c, &d, &f);
  9.    
  10.     prosek = (a+b+c+d+f) / 5.0;
  11.    
  12.     printf("%.2f", prosek);
  13.     return 0;
  14. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top