Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Forloop {
- public static void main(String[] args) {
- System.out.println("Hoe groot wordt je cijferpiramide?");
- Scanner scan = new Scanner(System.in);
- int y = scan.nextInt();
- for(int x = 0; x <= y; x++){
- for(int z = 0; z < x; z++){
- for (int i=0; i<x; i++) {
- System.out.print(x);
- }
- System.out.println("");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement