0

1st lesson project- Why can't I write code for both test questions?

When answering the test questions, I have the right answer but, the code fills in both test question 1 and test question 2 with the same result, which means one of the test questions is answered wrong. How do I fix this? import java.util.Scanner; public class Program { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int days = scanner.nextInt(); // int sum1 = 2*24; int sum2 = sum1*60; int sum3 = sum2*60; System.out.println(sum3); } } Test question 2 is 53*24

11th Jan 2021, 11:25 AM
Melissa Bates
Melissa Bates - avatar
3 Respostas
+ 3
Send your code along with the question here.
11th Jan 2021, 11:27 AM
Arsenic
Arsenic - avatar
+ 1
Done.
11th Jan 2021, 11:29 AM
Melissa Bates
Melissa Bates - avatar
0
How do I create one code to answer two different questions?
11th Jan 2021, 4:00 PM
Melissa Bates
Melissa Bates - avatar