-
January 26th, 2005, 10:22 PM
#1
Banned
java problem
I am programming in java and i just started out in college.
For my class i have to write a program with the if/else statements
i have this so far and im getting the following errors
System.out.print("Enter the length of the desk : ");
int length=MyInput.readInt();
System.out.print("Enter the width of the desk : ");
int width=MyInput.readInt();
int area = (length * width)
System.out.println("Enter 1 for pine wood");
System.out.println("Enter 2 for oak wood");
System.out.println("Enter 3 for mahogany wood");
System.out.print("Enter the type of wood: ");
int wood = MyInput.readInt();
if (wood == 2)
(desk+100);
else
(desk+150);
if (wood == 1)
desk = 200);
System.out.print("Enter the number of drawers: ");
int wood= MyInput.readInt();
lab3_141.java:20: ';' expected
System.out.print("Enter the number of drawers: ");
^
lab3_141.java:23: not a statement
desk+75;
^
lab3_141.java:25: not a statement
desk+150; }
^
3 errors
any suggestions?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|