Can someone look over this java program please?
Its suppose to output a triangle depending on the users input
ex
input-3
output
3
33
333
33
3
input-7
output
7
77
777
7777
77777
777777
7777777
777777
77777
7777
777
77
7
I know that right now it won't really work for numbers over 9
here it is
import java.util.Scanner;
public class TriangleOfDigits
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
int rows = input.nextInt();
//outer loop says how many lines
//*n by 2 and - 1 (how many lines needed
for (int rowNumber = 1; rowNumber <= rows; rowNumber++);
{
//inner loop says how many things on this line
for(int colNum = 1; colNum <= rowNumber; colNum++);
{
//print out thing
System.out.print(rows);
}
System.out.println();
}
for (int rowNumber = 1; rowNumber <= rows; rowNumber++);
{
//inner loop says how many things on this line
for(int colNum = rows; colNum > rowNumber; colNum--);
{
//print out thing
System.out.print(rows);
}
}
System.out.println();
}
}
These are the error messages Im getting
TriangleOfDigits.java:16: cannot find symbol
symbol : variable rowNumber
location: class TriangleOfDigits
for(int colNum = 1; colNum <= rowNumber; colNum++);
^
TriangleOfDigits.java:31: cannot find symbol
symbol : variable rowNumber
location: class TriangleOfDigits
for(int colNum = rows; colNum > rowNumber; colNum--);
Im not quite sure how to fix this
thanks in advance