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

it is a code on a visual c++ language. if am going to input number "1" the output will the word "one". how wil i solve this problem? could you help me? to all programmers i need you help
plsssssssssssss!!!!!

2006-08-09 17:33:45 · 2 answers · asked by daryl_ralph88 1 in Computers & Internet Programming & Design

2 answers

Declare an 2-d array to store numbers converted into words.
char nums[][];
nums[0] = "zero";
nums[1] = "one"; ... like this initialize with required numbers upto 99 or what ever you want.

Divide the number by 10. Take the reminder and use that as subscript with the array to get the number.
For ex: if your input is 5, 5 % 10 gives 5.
nums[5] gives you Five.



Hope this is clear.

2006-08-09 17:53:41 · answer #1 · answered by Indian_Male 4 · 0 0

i think of chevrolet spark is betetr equipment than estillo , which inspite of the undeniable fact that being a maruti product is in basic terms too plenty cramped iinside, chevy spark is extremely roomy from teh indise and is returning greater perfect mileage than the zen estilo , besides estilo has did no longer enthuse purchasers .

2016-11-04 06:17:03 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers