Results 1 to 2 of 2

Thread: help me plsss

  1. #1
    LeNzKiE is offline Member
    Join Date
    Aug 2009
    Posts
    4
    Rep Power
    0

    Default help me plsss

    im new using jcreator.. and i have a problem doing my project..... help me plsss...

    heres the question/problem...


    Create a program that allows the user to input a number and display the output in word format; (ranges from +1 to 1000, -1 to -1000)

    example input
    Enter a number: 111 -999

    Example output
    one hundred eleven
    negative nine hundred ninety nine



    /**
    * @(#)LeNzKiE.java
    *
    * LeNzKiE application
    *
    * @author
    * @version 1.00 2009/8/8
    */

    import java.io*;
    public class LeNzKiE {

    public static void main(String[] args)throws Exception {

    // TODO, add your application code

    BufferedReader input=new BufferedReader (new InputStreamReader(System.in));

    int num;

    System.out.println("Enter a number:");
    num=Integer.ParseInt(input.readLine());
    if (num==1)
    System.out.print("one");
    else if (num==2)
    System.out.print("two");
    }
    }




    this is the sample...
    kindly plss help me....

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    To the OP, please let's keep this in one thread only. As there's already a thread for this question, I am going to lock this one. Thanks for your cooperation.

    The other thread is here: plss help me using jcreator...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •