hello dear student I am providing pattern solution of Java programming you can use this solution in your ICSE board exam and find your goal in this post we are providing right angle triangle in opposite direction pattern solution in java and print it with stick.
how print right angle triangle in opposite direction
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package patterns;
/**
*
* @author rajesh kumar shukla
*/
public class pattern9 {
public static void main(String[] args) {
for (int row = 8; row >= 1; --row) {
for (int col = 1; col <= row; ++col) {
System.out.print("*");
}
System.out.println();
}
}
}
output
run:
********
*******
******
*****
****
***
**
*
0 comments:
Post a Comment