0% found this document useful (0 votes)
21 views

New Text Document Java

numbers

Uploaded by

KarimWohler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

New Text Document Java

numbers

Uploaded by

KarimWohler
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import java.util.

Scanner;
public class numberingSystem{
public static void main(String [] args){
Scanner reader = new Scanner(System.in);
System.out.println("Enter a Number: ");
number = reader.nextInt();
int length = 100;
int counter = 0;
String numberString;
for(int i = 0; i < length; i++){
if(length != 0){
length = (int)((number) / 100);
counter++;
}
if(counter = 0){
numberString = "Zero";
}
if(counter = 1){
if((int)(number) = 1){
numberString = "One";
}
if((int)(number) = 2){
numberString = "Two";
}
if((int)(number) = 3){
numberString = "Three";
}
if((int)(number) = 4){
numberString = "Four";
}
if((int)(number) = 5){
numberString = "Five";
}
if((int)(number) = 6){
numberString = "Six";
}
if((int)(number) = 7){
numberString = "Seven";
}
if((int)(number) = 8){
numberString = "Eight";
}
if((int)(number) = 9){
numberString = "Nine";
}
}

You might also like