Advertisement
Josif_tepe

Untitled

Nov 6th, 2024
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.75 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Zadaca {
  3.  
  4.     public static void main(String[] args) {
  5.         Scanner sc = new Scanner(System.in);
  6.  
  7.         int a = sc.nextInt();
  8.         int b = sc.nextInt();
  9.         int c = sc.nextInt();
  10.  
  11.         int prosek  =  (a + b + c) / 3;
  12.  
  13.         if(prosek >= 85) {
  14.             System.out.println("Prosek: " + prosek + " excellent");
  15.         }
  16.         else if(prosek >= 70 && prosek < 85) {
  17.             System.out.println("Prosek: " + prosek + " good");
  18.         }
  19.         else if(prosek >= 50 && prosek < 70) {
  20.             System.out.println("Prosek: " + prosek + " average");
  21.         }
  22.         else if(prosek < 50) {
  23.             System.out.println("Prosek: " + prosek + " poor");
  24.         }
  25.  
  26.     }
  27.    
  28. }
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement