Need help coding first program

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Need help coding first program

  1. #1
    Join Date
    Mar 2006

    Need help coding first program

    Trying to write a source code for total cost of shirts.

    The total cost of shirts is determined by the following formula:

    if number of shirts is greater than 15

    costPerShirt = 5.50

    if number of shirts is less than 15

    costPerShirt = 8.50

    The program must output the total cost for 1 to 10 shirts.

    I am suppose to use if else statement and loop, can anyone help me with this or give me reference to use for help. My first program.


  2. #2
    Join Date
    Aug 2003
    The java spec for if and loop statements are at:
    For Loop:

    Hope these help.

Similar Threads

  1. Help with a program
    By stormswimmer in forum Java
    Replies: 2
    Last Post: 01-02-2006, 04:17 PM
  2. problem in program in c++
    By mheasen in forum Architecture and Design
    Replies: 0
    Last Post: 03-20-2002, 10:24 AM
  3. Please help with running executable vb program.
    By Gordon Reichhardt in forum VB Classic
    Replies: 2
    Last Post: 01-08-2002, 11:06 AM
  4. How can I build copy protection into my program
    By W.Pierce in forum VB Classic
    Replies: 1
    Last Post: 12-11-2001, 09:28 AM
  5. Replies: 0
    Last Post: 12-15-2000, 11:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center