Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * Simple Conditions
- */
- import java.util.Scanner;
- public class _05a_Number_0_9_toText
- {
- public static void main(String[] args)
- {
- Scanner scan = new Scanner(System.in);
- int num = Integer.parseInt(scan.nextLine());
- if (num == 0) {
- System.out.println("zero");
- } else if (num == 1) {
- System.out.println("one");
- } else if (num == 2) {
- System.out.println("two");
- } else if (num == 3) {
- System.out.println("three");
- } else if (num == 4) {
- System.out.println("four");
- } else if (num == 5) {
- System.out.println("five");
- } else if (num == 6) {
- System.out.println("six");
- } else if (num == 7) {
- System.out.println("seven");
- } else if (num == 8) {
- System.out.println("eight");
- } else {
- System.out.println("nine");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement