Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main
- {
- public static void main (String[] args)
- {
- Scanner in= new Scanner (System.in);
- int num, sum=0, avg;
- for (int i= 0; i<=12 ; i++)
- {
- System.out.println("Please enter 12 grades");
- num=in.nextInt();
- sum= sum+num;
- }
- avg= sum/12;
- System.out.println("The average of the grades is: "+avg);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement