Thread: Need help ASAP

Results 1 to 4 of 4
  1. #1 Need help ASAP 
    Registered Member
    CTucker's Avatar
    Join Date
    Oct 2008
    Posts
    2,422
    Thanks given
    263
    Thanks received
    281
    Rep Power
    343
    Code:
    import java.util.Scanner;
    import static java.lang.System.*;
    
    public class lab07a {
    
    	public static void main(String args[]) {
    		for(int i = 0; i < 8; i++) {
    		Scanner keyboard = new Scanner(System.in);
    		int grade = keyboard.nextInt();
    		if((grade >= 90) && =< 100)) {
    			out.println(""+grade+" is an A");
     		} else if(grade >= 80 && =< 89) {
    			out.println(""+grade+" is an B");
    		} else if(grade >= 75 && =< 79) { 
    			out.println(""+grade+" is an C");
    		} else if(grade >= 70 && =< 74) {
    			out.println(""+grade+" is an D);
    		} else if(grade < 70 && >= 0) {
    			out.println(""+grade+" is an F");
    		} else if(grade < 0) {
    			out.println("THIS KID FAILS PERIOD");
    			}
    		}
    	}
    }
    whats wrong with it hurry im in skoools
    Reply With Quote  
     

  2. #2  
    orangeboy
    Guest
    Nothing that i know of but then again im just average at java
    Reply With Quote  
     

  3. #3  
    Registered Member
    CTucker's Avatar
    Join Date
    Oct 2008
    Posts
    2,422
    Thanks given
    263
    Thanks received
    281
    Rep Power
    343
    there is nothing wrong with it lol, thats why it is pissing me off
    Reply With Quote  
     

  4. #4  
    Registered Member
    king free's Avatar
    Join Date
    Sep 2007
    Posts
    226
    Thanks given
    0
    Thanks received
    1
    Rep Power
    89
    Code:
    import java.util.Scanner;
    import static java.lang.System.*;
    
    public class lab07a {
    
    	private static Scanner keyboard = new Scanner(System.in);
    
    	public static void main(String args[]) {
    		for(int i = 0; i < 8; i++) {
    			int grade = keyboard.nextInt();
    			if(grade >= 90 && grade <= 100) {
    				out.println(grade+" is an A");
    	 		} else if(grade >= 80 && grade <= 89) {
    				out.println(grade+" is an B");
    			} else if(grade >= 75 && grade <= 79) { 
    				out.println(grade+" is an C");
    			} else if(grade >= 70 && grade <= 74) {
    				out.println(grade+" is an D");
    			} else if(grade < 70 && grade >= 0) {
    				out.println(grade+" is an F");
    			} else if(grade < 0) {
    				out.println("THIS KID FAILS PERIOD");
    			}
    		}
    	}
    }
    Fixed for you.
    DON'T GET v&

    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •