Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class EnglishNameoftheLastDigit {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int input = Integer.parseInt(scanner.nextLine());
- int lastnumber = input % 10;
- if (lastnumber == 1){
- System.out.println("one");
- }else if (lastnumber == 2){
- System.out.println("two");
- }else if (lastnumber == 3){
- System.out.println("three");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment