Advertisement
Georgi_Benchev

Untitled

Nov 22nd, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.01 KB | None | 0 0
  1. package lekciq_3;
  2.  
  3. import jdk.nashorn.internal.runtime.regexp.joni.ScanEnvironment;
  4.  
  5. import java.util.Scanner;
  6.  
  7. public class task04 {
  8.     public static void main(String[] args) {
  9.         Scanner scanner = new Scanner(System.in);
  10.         int num = Integer.parseInt(scanner.nextLine());
  11.  
  12.         if (num == 1) {
  13.             System.out.println("one");
  14.         } else if (num == 2) {
  15.             System.out.println("two");
  16.         } else if (num == 3) {
  17.             System.out.println("three");
  18.         } else if (num == 4) {
  19.             System.out.println("four");
  20.         } else if (num == 5) {
  21.             System.out.println("five");
  22.         } else if (num == 6) {
  23.             System.out.println("six");
  24.         } else if (num == 7) {
  25.             System.out.println("seven");
  26.         } else if (num == 8) {
  27.             System.out.println("eight");
  28.         } else if (num == 9) {
  29.             System.out.println("nine");
  30.         } else {
  31.             System.out.println("number too big");
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement