Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
import java.util.Scanner;
int enternum = 0;
// int no = enternum;
System.out.println("enter number");
enternum = convert.nextInt();
String single[] = {
"zero",
"one",
"two",
"three",
"four",
"five",
"six",
"seven",
"eight",
"nine",
"ten",
"eleven",
"twelve",
"thirteen",
"fourteen",
"fifteen",
"sixteen",
"seventeen",
"eighteen",
"nineteen"
};
String ten[] = {"twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty", "ninety"};
String hundred[] = {
"one hundred",
"two hundred",
"three hundred",
"four hundred",
"five hundred",
"six hundred",
"seven hundred",
"eight hundred",
"nine hundred"
};
String thousand[] = {
"one thousand",
"two thousand",
"three thousand",
"four tbousand",
"five thousand",
"six thousand",
"seven thousand",
"eight thousand",
"nine thousand",
"ten thousand",
"eleven thousand",
"twelve thousand",
"thirteen thousand",
"fourteen thousand",
"fifteen thousand",
"sixteen thousand",
"seventeen thousand",
"eighteen thousand",
"nineteen thousand",
};
String buothousand[] = {
"twenty thousand",
"thirty thousand",
"forty thousand",
"fifty thousand",
"sixy thousand",
"seventy thousand",
"eighty thousand",
"ninety thousand"
};
String tenthousand[] = {
"twenty", "thirty", "forty", "fifty ", "sixy ", "sevent ", "eighty ", "ninety "
};
String buohundredthousand[] = {
};
String hundredthousand[] = {
"one hundred",
};
System.out.println(enternum + "=");
// System.out.println(" ="+no);
// no++;
// enternum = no;
do {
if (enternum == 0) {
syana = single[0];
enternum = 0;
} else if (enternum == 1) {
syana = single[1];
enternum = 0;
} else if (enternum == 2) {
syana = single[2];
enternum = 0;
} else if (enternum == 3) {
syana = single[3];
enternum = 0;
} else if (enternum == 4) {
syana = single[4];
enternum = 0;
} else if (enternum == 5) {
syana = single[5];
enternum = 0;
} else if (enternum == 6) {
syana = single[6];
enternum = 0;
} else if (enternum == 7) {
syana = single[7];
enternum = 0;
} else if (enternum == 8) {
syana = single[8];
enternum = 0;
} else if (enternum == 9) {
syana = single[9];
enternum = 0;
enternum = 0;
syana = single[11];
enternum = 0;
syana = single[12];
enternum = 0;
syana = single[13];
enternum = 0;
syana = single[14];
enternum = 0;
syana = single[15];
enternum = 0;
syana = single[16];
enternum = 0;
syana = single[17];
enternum = 0;
syana = single[18];
enternum = 0;
syana = single[19];
enternum = 0;
// ten
//
//
syana = ten[0];
syana = ten[1];
syana = ten[2];
syana = ten[3];
syana = ten[4];
syana = ten[6];
syana = ten[7];
// hundred
syana = hundred[0];
syana = hundred[1];
syana = hundred[2];
syana = hundred[3];
syana = hundred[4];
syana = hundred[6];
syana = hundred[7];
syana = hundred[8];
// thousand
// THOUSAND
syana = thousand[0];
syana = thousand[1];
syana = thousand[2];
syana = thousand[3];
syana = thousand[4];
syana = thousand[5];
syana = thousand[6];
syana = thousand[7];
syana = thousand[8];
syana = thousand[9];
syana = thousand[10];
syana = thousand[11];
syana = thousand[12];
syana = thousand[13];
syana = thousand[14];
syana = thousand[15];
syana = thousand[16];
syana = thousand[17];
syana = thousand[18];
// tenthousand
//
//
syana = tenthousand[1];
syana = tenthousand[2];
syana = tenthousand[3];
syana = tenthousand[4];
syana = tenthousand[5];
syana = tenthousand[6];
syana = tenthousand[7];
}
// buotenthousand
//
//
syana = buothousand[0];
syana = buothousand[1];
syana = buothousand[2];
syana = buothousand[3];
syana = buothousand[4];
syana = buothousand[5];
syana = buothousand[6];
syana = buothousand[8];
// hundredthousand
//
//
syana = hundredthousand[0];
syana = hundredthousand[1];
syana = hundredthousand[2];
syana = hundredthousand[3];
syana = hundredthousand[4];
syana = hundredthousand[5];
syana = hundredthousand[6];
syana = hundredthousand[7];
syana = hundredthousand[8];
// buohundrethousand
//
//
syana = buohundredthousand[0];
syana = buohundredthousand[1];
syana = buohundredthousand[2];
enternum = enternum - 300000;
syana = buohundredthousand[3];
syana = buohundredthousand[4];
syana = buohundredthousand[5];
syana = buohundredthousand[6];
syana = buohundredthousand[7];
syana = buohundredthousand[8];
syana = buomillion[0];
System.out.println(syana);
} while (enternum != 0);
// enternum = no;
// }
// System.out.println(" ="+no);