daily pastebin goal
23%
SHARE
TWEET

1 to 9

pproxidevengwess Mar 26th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package com.company;
  2.  
  3.         import java.util.Scanner;
  4.  
  5. public class Main {
  6.  
  7.     public static void main(String[] args) {
  8.         Scanner scanner = new Scanner(System.in);
  9.         double num = Integer.parseInt(scanner.nextLine());
  10.  
  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 if (num > 9) {
  31.             System.out.println("number too big");
  32.         }
  33.     }
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top