Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class dd{
- public static void main(String[] args) {
- for (int i=1; i<16; i += 1)
- {
- for (int k=0; k <= (i/2); k++)
- {
- System.out.print(" ");
- }
- for (int j=0; j!=i; j++)
- {
- System.out.print("*");
- }
- System.out.println("");
- }
- for (int i=1; i<16; i += 2)
- {
- for (int k=0; k <= (6-i/2); k++)
- {
- System.out.print(" ");
- }
- for (int j=16; j!=i; j--)
- {
- System.out.print("*");
- }
- System.out.println("");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement