+ 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.
24 odpowiedzi
+ 7
Show code
+ 3
Yeah man, use System.out.printIn(seconds);
+ 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 😆
+ 3
It's Roy I thought switch case too :-)
+ 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);
}
}
+ 2
Just curious what you meant by case. Is this from a code coach challenge?
+ 2
Sonic Yeah, I just thought he meant something about switch case 😅
+ 2
Sonic 😂 yeah he should have mentioned. Nnam Emmanuel If possible please write Code coach in your question to avoid confusion.
+ 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);
}
}
+ 1
....tried adding the 2nd case, but failed....
+ 1
Ok
+ 1
This is the right answer mate
+ 1
Thanks bro... God bless
+ 1
Anytime bro.. I will explain it briefly for you tomorrow, I'm going to sleep now. Goodnight
+ 1
Yeah. Goodnight
+ 1
Thanks man
Please explain in simpler terms....
Do you mean the output?
+ 1
Yeah, the program does the calculations not u. Ur only job is to input days and make the equation above
+ 1
Ok.... Thanks 4 everything
+ 1
@Sonic.... End of module project
+ 1
Sorry 4 d confusion guys. I'll take corrections.