Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- public class coupleThings{
- public static void main(String[] args){
- System.out.println("Enter your grade "); //asks for the grade
- Scanner x = new Scanner(System.in); //creates a new scanner
- int grade = x.nextInt(); //get the grade from the user
- System.out.println("Enter total number of points possible"); // asks for points poss
- int pointsPoss = x.nextInt(); // gets the points poss
- double gradePercent = grade/pointsPoss; // calculates the %
- System.out.println("Your % grade is " + gradePercent);// displays the %
- }
- }
Add Comment
Please, Sign In to add comment