Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. /*
  2. * To change this license header, choose License Headers in Project Properties.
  3. * To change this template file, choose Tools | Templates
  4. * and open the template in the editor.
  5. */
  6. package testconsole;
  7. import java.util.Scanner;
  8.  
  9. public class Testconsole {
  10.  
  11. /**
  12. * @param args the command line arguments
  13. */
  14. public static void main(String[] args) {
  15. Scanner sc = new Scanner(System.in);
  16. System.out.println("Lütfen bir sayı giriniz.");
  17. int sayi = sc.nextInt();
  18. System.out.println();
  19. for (int i = sayi ; i > 0; i--) {
  20. for (int j = 0; j < i; j++) {
  21. System.out.print(i+" ");
  22. }
  23. System.out.println();
  24. }
  25.  
  26.  
  27. }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement