Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- /*
- * Created by todor on 17.01.2017 г..
- */
- public class u05v2_NumberToText {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int num = Integer.parseInt(scan.nextLine());
- switch (num) {
- case 0:
- System.out.println("zero");
- break;
- case 1:
- System.out.println("one");
- break;
- case 2:
- System.out.println("two");
- break;
- case 3:
- System.out.println("three");
- break;
- case 4:
- System.out.println("four");
- break;
- case 5:
- System.out.println("five");
- break;
- case 6:
- System.out.println("six");
- break;
- case 7:
- System.out.println("seven");
- break;
- case 8:
- System.out.println("eight");
- break;
- case 9:
- System.out.println("nine");
- break;
- default:
- System.out.println("number too big");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement