Advertisement
Guest User

Untitled

a guest
Jan 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public class MyClass {
  2. public static void main(String args[]) {
  3. int n = 7;
  4. char a = '*';
  5. char b = '£';
  6. for(int i=n; i>0; i--){
  7. for(int k=0; k<n-i; k++){
  8. System.out.print(" ");
  9. }
  10. for(int j=i*2-1; j>0; j--){
  11. System.out.print(a);
  12. }
  13. System.out.print(" ");
  14. for(int k=2*(n-i)+1; k>0; k--){
  15. System.out.print(b);
  16. }
  17. System.out.println();
  18. }
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement