Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Übung10 {
- public static void main(String[] args) {
- int h = 19;
- int l = 1;
- int s = h/2;
- int help1;
- int help2;
- int count = 0;
- while (count <= h) {
- help1=l;
- help2=s;
- while (help2 > 0) {
- System.out.print(" ");
- help2--;
- }
- while (help1 > 0) {
- System.out.print("A");
- help1--;
- }
- if (count < h / 2) {
- l+=2;
- s--;
- count++;
- System.out.println();
- } else {
- l-=2;
- s++;
- count++;
- System.out.println();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement