dynamicOne
asked on
Java Error
I have a simple java program with an error on line 14 and the code looks fine. What am I missing?
public class Carpet
// This application performs arithmetic with two integers
{
public static void main(String[] args)
{
int carpetLength = 14;
int carpetWidth = 11;
double carpetPrice = 3.75;
System.out.print("Length of the carpet is " + carpetLength);
System.out.println("ft");
System.out.print("Width of the carpet is " + carpetWidth);
System.out.println("ft");
System.out.println("Price for square foot is $" + carpetPrice);
product = carpetLength * carpetWidth;
System.out.println("Cost for carpeting the room is $" + product * carpetPrice);
}
}
public class Carpet
// This application performs arithmetic with two integers
{
public static void main(String[] args)
{
int carpetLength = 14;
int carpetWidth = 11;
double carpetPrice = 3.75;
System.out.print("Length of the carpet is " + carpetLength);
System.out.println("ft");
System.out.print("Width of the carpet is " + carpetWidth);
System.out.println("ft");
System.out.println("Price for square foot is $" + carpetPrice);
product = carpetLength * carpetWidth;
System.out.println("Cost for carpeting the room is $" + product * carpetPrice);
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Not a problem, glad to help!
ASKER