- 1
Line 0 cannot find symbol is my error. How do i fix this it's a time converter project. Please help
import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int amount = scanner.nextInt(); //your code goes here int months = 3 for(int i = 0; i < months i++) amount = amount * 90 / 100; System.out.printIn(amount); } }
11 Answers
+ 1
The following section is incorrect.
int hours = days = 24;
int minutes = hours = 60;
int seconds = minutes = 60;
System.out.printIn(seconds);
Review the lessons on creating and assigning variables.
Hint: your input is "days" so int hours = days * 24;
+ 1
Mark Angelo Alarcon hi, show ur new version of code, if u still have problems:)
0
How
0
Here. Please help me
0
Here too
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 hours = days = 24;
int minutes = hours = 60;
int seconds = minutes = 60;
System.out.printIn(seconds);
}
}
0
This is Sololearn project? How I can find it?
0
Yeah
0
In basic concepts
0
Sir thank you. I already fixed that. But i encountered another problem.
':' expected
How do i fix that?
0
Great! Well done.
Can you post your new code?
It means you're missing the ";" semi-colon at the end of a line.
- 1
Hi! Please, show your code here.