Rewrite the following code using if...else if statement.
Switch (direction)
{
Case "N" : a = "North"; break;
Case "E" : a = "East"; break;
Case "W" : a = "West"; break;
Case "S" : a = "South"; break;
default : a = "Enter correct code";
}
document.write (a)
Answers
Answered by
2
here is your answer
hope so it may help you
please mark me as the Brainliest answer:-)
Attachments:
Answered by
13
Else statement is-
else
{
System.out.println("Enter correct code.");
}
Refer to the attachment
Attachments:
Similar questions