Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

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.

Thanks
[516 byte] By [aluna] at [2007-11-11 8:14:40]
# 1 Re: Need help coding first program
The java spec for if and loop statements are at:
If: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/if.html
For Loop: http://java.sun.com/docs/books/tutorial/java/nutsandbolts/for.html

Hope these help.
evlich at 2007-11-11 22:35:59 >