+ 1
Please help me,find my error anyone please?
import java.util.Scanner; public class studentmarks() { public static void main(String[] args) { int marks,s1,s2,s3,total%; System.out.println("Enter marks"); Scanner ob=new Scanner(System.in); System.out.println("enter s1 marks"); s1=ob.nextTInt(); System.out.println("enter s2 marks"); s2=ob.nextTInt(); System.out.println("enter s3 marks") s3=ob.nextTInt(); marks=(s1+s2+s3)*100; total%=marks/300; System.out.println(total%); if(total%>33) {System.out.println("pass");} else {System.out.println("fail");} } }
4 Answers
+ 4
Variable can't have special characters.
total% is invalid.
class name also variable, so should not have a special characters
studentmarks() invalid. Just put
class studentmarks {
ob.nextTInt() not exist. Don't include T
ob.nextInt() ; //
also you have logic errors..
+ 5
I will help you if you will save it as code bit and share its link in your post Description
https://www.sololearn.com/post/75089/?ref=app
With raw text code like this, we can't refer line numbers, how do we say which line need to be fixed?
+ 2
Thank you everyone â¤ď¸
+ 1
Tansi Nâ¤ď¸