@NanaOhene_Nyark/

SaltyRapidFunctions

Java

No description

fork
loading
Files
  • Main.java
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
}
  import java.util.Scanner;
  
   public class Lab03 
{

      public static void main(String[] args)
      {
         Scanner keyboard = new Scanner(System.in);
      
                  
         System.out.print("please enter score 1:");
         
         double number1 = keyboard.nextInt();
            
         System.out.print("please enter score 2:");    //Number is input from keyboard
         
         double number2 = keyboard.nextInt();
         
         System.out.print("please enter score 3:");
         
         double number3 = keyboard.nextInt();
         
         System.out.print("please enter score 4:");
         
         double number4 = keyboard.nextInt();
         
         System.out.print("please enter score 5:");
         
         double number5 = keyboard.nextInt();
         
         double average = (number1 + number2 + number3 + number4 + number5)/5;
         System.out.print("your average is " + average);
         
         double sum = 0;
         double score = 100;
         for(int x = 0; x < 5; x++);
      }
         if(average > 0 && average < 100)}      
   }
         if(average > 89.5 && average <= 100 ){
            System.out.println(" your score is an A");
         }
         else if(average > 79.5 && average <= 89.4){
            System.out.println("your score is a B");
         }
         else if(average > 69.5 && average <= 79.4){
            System.out.println(" your score is a C");
         }
         else if(average > 64 && average <= 69.4){
            System.out.println(" your score is a D");
         }
         else if(average > 50 && average <= 63.9){
            System.out.println(" your score is a F");
         }
         
         
      }
   }