Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Forloop {
  4.    
  5.     public static void main(String[] args) {
  6.        
  7.         System.out.println("Hoe groot wordt je cijferpiramide?");
  8.         Scanner scan = new Scanner(System.in);
  9.         int y = scan.nextInt();
  10.         for(int x = 0; x <= y; x++){
  11.             for(int z = 0; z < x; z++){
  12.                 for (int i=0; i<x; i++) {
  13.                     System.out.print(x);
  14.                 }
  15.                 System.out.println("");
  16.             }
  17.         }
  18.        
  19.        
  20.     }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement