Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Zadaca {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- int a = sc.nextInt();
- int b = sc.nextInt();
- int c = sc.nextInt();
- int prosek = (a + b + c) / 3;
- if(prosek >= 85) {
- System.out.println("Prosek: " + prosek + " excellent");
- }
- else if(prosek >= 70 && prosek < 85) {
- System.out.println("Prosek: " + prosek + " good");
- }
- else if(prosek >= 50 && prosek < 70) {
- System.out.println("Prosek: " + prosek + " average");
- }
- else if(prosek < 50) {
- System.out.println("Prosek: " + prosek + " poor");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement