+ 1
how to display this program?
# ## ### #### ##### ###### #######
6 Réponses
+ 1
public class Main
{
public static void main(String args[])
{
for(int i=1;i<=7;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print('#');
}
System.out.println();
}
}
}
//sorry for the indentation
0
Use nested for loops.
0
public class tc {
public static void main(String...Naufal) {
int a = 7;
for (int i = 0; i<a; ++i){
for (int j = 0; j<=i; j+=1){
System.out.print("#");
}
System.out.print("\n");
}
}
}
/*
#
##
###
####
#####
######
#######
*/
0
i made it
0
😍😍
0
😍😍