I want to get the following output:
n: 4
+
++
+++
++++
That is, I insert an "n" and I will get a kind of triangle in which the base corresponds to a number of asterisks that is requested by input. I made the following code but this only hits the number of lines and not of elements per line:
System .out . println("Indique um número inteiro positivo:");
int n = scanner.nextInt();
int triangulos = 0;
int i ;
for(i=0; triangulos < n ; triangulos++)
{
System.out.println("n:" + n);
System.out.println("*");
}