+ 1
Java
Hi, how can i write this in java. Thanks * *** ***** *** *
6 odpowiedzi
+ 3
You need for loops to create these patterns have a try if you fail think differently about it if you still cant do it, show me your efforts and I'll help you.
+ 3
In your program, the i needs to increment by 2 each time. You will also need another nested set of loops where the outer loop counter is defermented by 2 in each iteration.
+ 1
public class Program
{
public static void main(String[] args) {
for(int i=1; i<=5; i++){
for(int j=1; j<=i ;j++){
System.out.print("*");
}
System.out.println(" ");
}
}
}
+ 1
i could only write that