Please help me,find my error anyone please? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 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");} } }

10th Sep 2022, 4:02 PM
Sachin Patel
Sachin Patel - avatar
4 Antworten
+ 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..
10th Sep 2022, 4:12 PM
Jayakrishna 🇮🇳
+ 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?
10th Sep 2022, 4:09 PM
Ipang
+ 2
Thank you everyone ❤️
10th Sep 2022, 4:36 PM
Sachin Patel
Sachin Patel - avatar
+ 1
Tansi N❤️
10th Sep 2022, 4:37 PM
Sachin Patel
Sachin Patel - avatar