Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Andrew Oughton
- *9/20/12
- *Prints out a comment based on an letter grade
- */
- import java.text.DecimalFormat;
- import TerminalIO. KeyboardReader;
- class OughtonPrg5{
- public static void main(String args[]){
- KeyboardReader reader = new KeyboardReader();
- char grade;
- double i;
- for(i = 1; i <= 4; i = i+1){
- System.out.println("\nEnter the letter grade in capitols.");
- grade=reader.readChar();
- if(grade=='A')System.out.println("Excellent.");
- if(grade=='B')System.out.println("Good.");
- if(grade=='C')System.out.println("Average.");
- if(grade=='D')System.out.println("Poor.");
- if(grade=='E')System.out.println("Failing.");
- if(grade=='F')System.out.println("Failing.");
- }
- }
Add Comment
Please, Sign In to add comment