I am writing a program that I have to take the length of a rectangle (1-10) and multiply them by the width(1-10) I am using a for loop and this is what I have so far
the error is in line 14 and it is saying "variable height might not have been initialized."
Code:
public class area
{
public static void main(Strings args[])
{
int height;
int width;
int area;
int i;
int e;
for (i=1; i>=11; i++);
height = i;
for (e=1; e>=11; e++);
width = e;
(area) = (height) * (width);
System.out.print (area);}
}
Comment