View Full Version : pa help po sa programming ko!!!plzz..urgent po as soon as posible polss


kissomos
1st Sep '08 Mon, 21:05
pa help po d2..

switch case po 2...

output:

EX:
enter a number: 143


ang lalabas eh "one hundred forty three"

from 1-3999 daw po ung gawin namin...

rnoldec
1st Sep '08 Mon, 23:29
saang prog'g language po?

count and group the inputted nos by 3 starting from the right.
then in your switch case, get the value of the corresponding word.
ex. input no: 245

switch (inputted_no)
{
case '2':
if (inputted_no.position = 4) output = "two thousand"
else (inputted_no.position = 3) output = "two hundred"
else (inputted_no.position = 2) output = "twenty"
else output = "two"
break;
}

loop until all numbers have been read and validated by your program.
concatenate the output then display.