+ 1
Seeking for help
please help me do this code, i'm lost. https://code.sololearn.com/c2X1d7P2BdJq/?ref=app
4 odpowiedzi
+ 2
Your code looking incomplete many you want to enter Mark's from user and u want that if any student got highest mark then u have to print Excellent , if they got average no then print average . If they got less number according to your given condition then print fail .
For this program you need if else condition
open this u will see examples
http://javaprogexamples.blogspot.com/2013/11/simple-java-program-9-pass-or-fail.html?m=1
+ 1
Line 13:
Make like it:
marks =s.nextInt();
+ 1
import java.util.*;
public class Remarks
{
public static void main(String[] args) {
int marks, grade=0, excellent=0, poor=0, failed=0, invalidgrade=0 ;
Scanner s = new Scanner(System.in);
System.out.print("Input grades");
marks =s.nextInt() ;
}
See the last line it was only which was raising error .
To take input integer use nextInt
0
Then in this condition you must have mentioned it earlier and this is not a tough problem you can do it your self too. And I have resolved only the error