{
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String number=reader.readLine();
int num=Integer.parseInt(number);
if(num==1){
System.out.println("Monday");
}
else if(num==2){
System.out.println("Tuesday");
}
else if(num==3){
System.out.println("Wedsday");
}
else if(num==4){
System.out.println("Thursday");
}
else if(num==5){
System.out.println("Friday");
}
else if(num==6){
System.out.println("Saturday");
}
else if(num==7){
System.out.println("Sunday");
}
else {
System.out.println("No such day of the week");
}
}
}
which statement in this code is not satisfying task conditions ?
Under discussion
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Guadalupe Gagnon
17 January 2019, 14:35
Wednesday is mis-spelled.
Do not copy and paste code next time. Use the slider to attach code:
-
-
↓
![]()

0