+ 2

Good day guys. Please how can I separate cases in my project in the code playground? Case 1 works but the rest goes wild.

17th Jan 2021, 7:34 PM
Nnam Emmanuel
Nnam Emmanuel - avatar
24 Answers
+ 7
Show code
17th Jan 2021, 8:10 PM
Maher Al Dayekh
Maher Al Dayekh - avatar
+ 3
Yeah man, use System.out.printIn(seconds);
17th Jan 2021, 11:34 PM
Maher Al Dayekh
Maher Al Dayekh - avatar
+ 3
You Nnam Emmanuel man! What are you doing ? It supposed that your program who should do the work, not you ! You misunderstood the concept of programming I guess 😆
18th Jan 2021, 12:41 AM
Hisham YUM 🇲🇦
Hisham YUM 🇲🇦 - avatar
+ 3
It's Roy I thought switch case too :-)
19th Jan 2021, 2:36 AM
Sonic
Sonic - avatar
+ 2
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 seconds = days*24*60*60; System.out.println(seconds); } }
17th Jan 2021, 11:40 PM
Maher Al Dayekh
Maher Al Dayekh - avatar
+ 2
Just curious what you meant by case. Is this from a code coach challenge?
18th Jan 2021, 8:55 PM
Sonic
Sonic - avatar
+ 2
Sonic Yeah, I just thought he meant something about switch case 😅
19th Jan 2021, 2:14 AM
ltsRoy
ltsRoy - avatar
+ 2
Sonic 😂 yeah he should have mentioned. Nnam Emmanuel If possible please write Code coach in your question to avoid confusion.
19th Jan 2021, 5:11 AM
ltsRoy
ltsRoy - avatar
+ 1
Here it is:- 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 seconds = 2 * 24 * (60) * (60); System.out.println(172800); } }
17th Jan 2021, 11:33 PM
Nnam Emmanuel
Nnam Emmanuel - avatar
+ 1
....tried adding the 2nd case, but failed....
17th Jan 2021, 11:34 PM
Nnam Emmanuel
Nnam Emmanuel - avatar
+ 1
Ok
17th Jan 2021, 11:35 PM
Nnam Emmanuel
Nnam Emmanuel - avatar
+ 1
This is the right answer mate
17th Jan 2021, 11:40 PM
Maher Al Dayekh
Maher Al Dayekh - avatar
+ 1
Thanks bro... God bless
17th Jan 2021, 11:42 PM
Nnam Emmanuel
Nnam Emmanuel - avatar
+ 1
Anytime bro.. I will explain it briefly for you tomorrow, I'm going to sleep now. Goodnight
17th Jan 2021, 11:43 PM
Maher Al Dayekh
Maher Al Dayekh - avatar
+ 1
Yeah. Goodnight
17th Jan 2021, 11:45 PM
Nnam Emmanuel
Nnam Emmanuel - avatar
+ 1
Thanks man Please explain in simpler terms.... Do you mean the output?
18th Jan 2021, 7:30 AM
Nnam Emmanuel
Nnam Emmanuel - avatar
+ 1
Yeah, the program does the calculations not u. Ur only job is to input days and make the equation above
18th Jan 2021, 1:26 PM
Maher Al Dayekh
Maher Al Dayekh - avatar
+ 1
Ok.... Thanks 4 everything
18th Jan 2021, 7:10 PM
Nnam Emmanuel
Nnam Emmanuel - avatar
+ 1
@Sonic.... End of module project
18th Jan 2021, 9:17 PM
Nnam Emmanuel
Nnam Emmanuel - avatar
+ 1
Sorry 4 d confusion guys. I'll take corrections.
19th Jan 2021, 6:47 AM
Nnam Emmanuel
Nnam Emmanuel - avatar