Guest User

Untitled

a guest
Jul 16th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class coupleThings{
  4. public static void main(String[] args){
  5. System.out.println("Enter your grade "); //asks for the grade
  6. Scanner x = new Scanner(System.in); //creates a new scanner
  7. int grade = x.nextInt(); //get the grade from the user
  8. System.out.println("Enter total number of points possible"); // asks for points poss
  9. int pointsPoss = x.nextInt(); // gets the points poss
  10. double gradePercent = grade/pointsPoss; // calculates the %
  11. System.out.println("Your % grade is " + gradePercent);// displays the %
  12.  
  13.  
  14.  
  15. }
  16. }
Add Comment
Please, Sign In to add comment