Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Test {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int i, top=0, bred, j;
- char[] alphabet = {'A','B','C','D','E','F','G',
- 'H','I','J','K','L','M','N','O','P','Q','R',
- 'S','T','U','V','W','X','Y','Z', 'Å', 'Ä', 'Ö'};
- while (top!=-1){
- System.out.print("Put in the length of the 2 equally long sides (end with -1)");
- top = scan.nextInt();
- if(top == -1) { break; }
- System.out.print("Should the perpendicular angle be down (0) or up (1)");
- bred = scan.nextInt();
- if (bred== 0)
- {
- for( i =1; i<=top; i++)
- {
- for( j=1; j<=top; j++)
- {
- if(j<=i)
- {
- {
- }
- for(int zz = (i-1 ); zz >= 0 ; zz--)
- {
- System.out.print(alphabet[zz]);
- }
- System.out.println();
- }
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement