Search:

Type: Posts; User: ghostheadx

Search: Search took 0.13 seconds.

  1. Replies
    17
    Views
    3,061

    Re: is something wrong with my code? Lab 10.1

    Here's what I've changed my code to:




    String[] multiplesOfTen = {"", "ten", "twenty", "thirty", "forty", "fifty"};
    String[] units = {"", "one", "two", "three", "four", "five", "six",...
  2. Replies
    17
    Views
    3,061

    Re: is something wrong with my code? Lab 10.1

    Because I wanted to do it for each integer. I figured I could say that (pseudocode):



    if var[0 == num[0] {

    System.out.println(words[0])

    }
  3. Replies
    17
    Views
    3,061

    Re: is something wrong with my code? Lab 10.1

    I have one array for digits 1-12 because those are the ones that are expressed in one syllable. I figured I'd store those in the same array so that I could add elements from that onto the second...
  4. Replies
    17
    Views
    3,061

    Re: is something wrong with my code? Lab 10.1

    I would want it to print the name of the number once, up to 50. So if the number was 55, I guess that's an error. But if the number if 45, I want it to say "forty-five." Basically, I want it to say...
  5. Replies
    17
    Views
    3,061

    is something wrong with my code? Lab 10.1

    Here are the instructions:

    The int t contains an integer between 1 and 50 (inclusive). Write code that outputs the number in words and stores the result in the String inwords. For example, if t is...
Results 1 to 5 of 5