Computer Applications
Write a program to print the series given below.
5 55 555 5555 55555 555555
Java
Java Nested for Loops
11 Likes
Answer
public class Kboat5Series
{
public static void main(String args[]) {
for (int i = 1; i <= 6; i++) {
for (int j = 0; j < i; j++) {
System.out.print('5');
}
System.out.print(' ');
}
}
}
Output
Answered By
8 Likes
Related Questions
Write a program in Java to display the following patterns.
# * * # # # * * * * # # # # #
Write a program in Java to display the following pattern:
*
* #
* # *
* # * #
* # * # *Write a program in Java to display the following pattern:
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15Write a program in Java to display the following patterns.
1 * * * * * 2 * * * * * 3 * * * * * 4 * * * * * 5