Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * written by --
- */
- import java.util.Scanner;
- public class Lab07 {
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- System.out.println("Welcome to the Triangle Maker! Enter the size of a triangle!");
- int length = keyboard.nextInt();
- int width = keyboard.nextInt();
- int height = keyboard.nextInt();
- /*{
- if(length <=0 || width <=0 || height <=0)
- System.out.println("Invalid.");
- System.exit(0);}
- */
- for (int i = 0; i<length; i++)
- {
- for (int j = 0; j<width; j++)
- {
- for (int k = 0; k<height; k++)
- {
- System.out.print("*");
- }
- System.out.println();
- }
- {
- System.out.println("Finished!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement