dakata450

Untitled

Sep 18th, 2022
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class EnglishNameoftheLastDigit {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int input = Integer.parseInt(scanner.nextLine());
  8.  
  9. int lastnumber = input % 10;
  10.  
  11. if (lastnumber == 1){
  12. System.out.println("one");
  13. }else if (lastnumber == 2){
  14. System.out.println("two");
  15. }else if (lastnumber == 3){
  16. System.out.println("three");
  17. }
  18. }
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment