+ 1
I've been doing a Java code project (10) and i always get an error. can anyone tell what's wrong with it?
this is the code, the error said " ";" excepted at line 0" import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); //Your code goes here int hrs = days * 24; int scnds = hrs * 60; System.out.printIn(scnds); } } can't figure it out 😕
2 odpowiedzi
+ 3
It's a mistake / typo in 'System.out.println'
https://code.sololearn.com/c4TL9ko41jB3/?ref=app
+ 1
i fix it for you
import java.util.Scanner;
public class Program {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int days = scanner.nextInt();
//your code goes here
int hrs = days * 24;
int mins = hrs * 60;
int scnds = mins * 60;
System.out.println(scnds);
}
}