thieumao

Tam giác ngược 2

Jun 13th, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5. package tamgiac;
  6.  
  7. /**
  8.  *
  9.  * @author thieumao
  10.  */
  11. public class tg {
  12.  
  13.     public static void main(String[] args) {
  14.         int i, j;
  15.         for (j = 10; j > 0; j--) {
  16.             for (i = 10; i > j; i--) {
  17.                 System.out.print(" ");
  18.             }
  19.             for (i = 0; i < j; i++) {
  20.                 System.out.print("*");
  21.             }
  22.             System.out.println("");
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment