English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

can anyone help me with this:
how do you check for the hundreds place of a number???
how do you do this:
make a program that would right the numerical input into words. example:
input: 250
output: two hundred fifty
...
if you can provide a link the better

2007-09-06 00:04:02 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

can you put everything in detail... cuz it doesn't really ring any bell

2007-09-06 01:12:25 · update #1

4 answers

use % (mode symbol) and / (integer division) symbol
for finding hundreds place of a number.


use arrays for the second part.

2007-09-06 00:11:30 · answer #1 · answered by iyiogrenci 6 · 1 0

This should be pretty easy to do.

You can easily do it with a while loop and a lookup table, and stack your results because they will come out in the reverse order.

Assume you have a short variable (16-bits).
short number;

while(number)
{
printf("%d", number % 10); //BASE 10
number /= 10;
}

This will print the number reversed for you.

2007-09-06 07:13:15 · answer #2 · answered by Anonymous · 0 1

look dear , to write the program, no body having time like it but i am suggesting you about the logic, so for it consider the array of character types.......then implements your logic if having problems so just go thorugh the url given below and post the query in site mention id ....
http://www.commediait.com

2007-09-06 07:46:14 · answer #3 · answered by top s 3 · 0 1

May be you can contact a C expert. Check websites like http://askexpert.info/

2007-09-06 09:58:09 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers