#(newbie) converting integers to string describing expanded format with expandNumber()

20 messages · Page 1 of 1 (latest)

vestal sand
#

I cannot figure out how to use the "private static dataType methodName(inputs){" parameter to write a number in expanded format using the hundred, tens, and ones places.

The input has to be an integer

The output has to be a string describing the expanded format

cyan oreBOT
#

This post has been reserved for your question.

Hey @vestal sand! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

zealous harness
#

i mean, you just described your input and output types

#

what are you stuck on in the header?

vestal sand
zealous harness
#

...call it?

#

or do you mean implementing it?

#

you aren't clearly describing your issue at all

vestal sand
#

i do not know how to go from integer to expanded form in string

#

i don't know what implenting means sorry :c

zealous harness
obtuse lilyBOT
#

int alphabet-245;
alphabet=Help.expandNumber(alphabet);
System.out.println("This is 245 in words: "+alphabet);

} private static int expandNumber(int abcbig){ return output; }

This message has been formatted automatically. You can disable this using /preferences.

cyan oreBOT
#
int alphabet-245;
alphabet=Help.expandNumber(alphabet);
System.out.println("This is 245 in words: "+alphabet);

} 
private static int expandNumber(int abcbig){
         return output;
} 
vestal sand
#

int alphabet=245**

shut reef
hollow pelican
#

I think he wants the spelt out words of the numbers, I might be wrong but that's what I think

unborn hornet
#

Wait so you need a method to convert a int describing the number like “four hundred”

vestal sand