Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ch8ex11
- {
- public static void printStarTraingle(int n){
- /* int p;
- int rowspace = n - 1;
- for (p=1; p==n; p++){
- //rowspace * " " + "*";
- int starnum = p + p - 1;
- //System.out.println("rowspace" + "starnum");
- String star = "*";
- String starr = StringUtils.repeat(star, starnum);
- System.out.println(starr);
- rowspace = rowspace - 1;
- */
- int p;
- for(p;
- }
- }
- public static void main(){
- Scanner input = new Scanner(System.in);
- System.out.println("What is your n?: ");
- int n = input.nextInteger();
- printStarTriangle(n);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement