for example:
input: 190.65
output:one hundred ninety and sixty five
Write a c++ program that convert numeric value to string?
Step 1: Convert floating point number to a string using these samples
http://www.cprogramming.com/tips/showTip...
http://www.codeguru.com/forum/showthread...
i.e., 190.65 to
convertedStr = "190.65";
Step 2: Have an array of strings like
text[0] = "";
text[1] = "one";
text[2] = "two";
text[3] = "three";
and lookup for each char in the converted string:
if(convertedStr[0] == '1') output = text[1];
cheap flowers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment