Write a program in Java to print
@
@@
@@@
@@@@
@@@@@
Answers
Answered by
2
Answer:
public class Sample {
public static void main(String[] args) {
char sign = '@';
for(int i = 1; i <= 5; i++) {
for(int s = 1; s <= i; s++) {
System.out.print(sign);
}
System.out.println("");
}
}
}
Similar questions