Write a program in java using switch-case to accept an integer number and print the last digit of the number in words.
Share
Write a program in java using switch-case to accept an integer number and print the last digit of the number in words.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
The switch statement is one of the more syntactically complicated expressions in Java. The expression in the switch statement must be of type char, byte, short, or int. It cannot be boolean, float, double, or String.
Syntax
The variable used in a switch statement can only be integers, convertable integers (byte, short, char), strings and enums.
You can have any number of case statements within a switch. ...
The value for a case must be the same data type as the variable in the switch and it must be a constant or a literal.
Explanation:
Hope it was helpful
Please mark as brainliest
And follow me please please
Give me thanks I have very less thanks