Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 24 results for
numbertoword
- Page 1
creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by diyez treze
…... here's my codes: import java.util.Scanner; public class
NumberToWord
{ public static final String[] DIGITS = {"one", "two…
New Problem (calculating sum of numbers)
Programming
Software Development
13 Years Ago
by makeUbleed
… converting numbers to word. [CODE]import java.util.*; public class
NumberToWord
{ public static final String[] DIGITS = {"one", "two…
convert number into words
Programming
Software Development
12 Years Ago
by jayadan
… in advance guys:):):) [ICODE]import java.util.Scanner; public class
NumberToWord
{ public static final String[] DIGITS = {"one", "two…
Re: convert number into words
Programming
Software Development
12 Years Ago
by jayadan
… told you earlier [ICODE]import java.util.Scanner; public class
NumberToWord
{ public static final String[] DIGITS = {"one", "two…
Re: how to conver figures to words
Programming
Software Development
15 Years Ago
by funmaza
… strword = NumberToWords(val(text1.text)) msgbox strword end sub ------ Name ::
NumberToWord
-------------- Option Explicit Dim str1, str2 Public Function NumberToWords(Number As…
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by diyez treze
Please help me
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by musthafa.aj
what you actually want to do? the program you written has no errors look like and it is correct. then what you want..
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by diyez treze
add decimal numbers
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by diyez treze
please.. if i convert 9999.99 it is error.. and if i enter "x" the program will be ended
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by musthafa.aj
the scanner reads inputs as a string ..can you try to give input as a string like [B]"9999.99"[/B] instead of 9999.99
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by diyez treze
it doesn't work.i already tried that one.. can you revise my code?? please help me
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by diyez treze
@musthafa.aj PLEASE HELP ME!!!
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by diyez treze
please email me your suggestion... [email]jovy_10_13@yahoo.com[/email] thanks
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by musthafa.aj
sorry i don't have time to spend with you.. you get input as string and use split or stringtokenizer to get decimal within quotes.. for eg: [CODE] String str="9999.99"; String str2[]=str.split("\""); int dec=Integer.parseInt(str2[0]);[/CODE]
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by diyez treze
okay thanks..
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by jon.kiparsky
Okay, you want it to handle decimals. You can read a decimal, right? You can take the string "123.456" and parse it into a double? Okay, you could read that in a couple of different ways, but the easiest is "one hundred twenty three point four five six." So take your double, and break it up into the integer part and the …
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by diyez treze
so i must put put also a double? okay thanks
Re: creating a scanner file converting number to words(with looping and decimals)
Programming
Software Development
13 Years Ago
by jon.kiparsky
You know, I think Mustafa's idea is a better one. Get the input as a String, and split the string on ".", and you'll have the integer part and the fractional part. You've got the method for handling the integer part (don't forget to convert to integer!), so you just need to come up with something for the fractional part.
Re: New Problem (calculating sum of numbers)
Programming
Software Development
13 Years Ago
by javinpaul
Use currentNumber = //your current Number result = resutlt + currentNumber; while ending you can print result.
Re: convert number into words
Programming
Software Development
12 Years Ago
by stultuske
Why can't you do it for decimal numbers? the logic is about the same, but you'll just need to accept a numeric type that is capable of taking decimal numbers, like float or double, and take into consideration the number of leading zeroes in your decimal part, too.
Re: convert number into words
Programming
Software Development
12 Years Ago
by jayadan
stultuske i did the same thing using double data type but i am getting error in all the append lines in the program and i tried all possible ways and i m out of ideas so seeking help from u guys...if possible u try replacing int to double...
Re: convert number into words
Programming
Software Development
12 Years Ago
by stultuske
well, how about you show what you tried that didn't work. it'll be easier for us to determine if and (if so) what you did wrong.
Re: convert number into words
Programming
Software Development
12 Years Ago
by stultuske
well, I get ArrayIndexOutOfBounds 49 and stuff like that, so you may want to recheck your code a bit.
Re: convert number into words
Programming
Software Development
12 Years Ago
by jayadan
stultuske i dont understand what your saying and i could execute it for some random nos but not all nos.....
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC