Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Opg5 {
- public static void main(String[] args){
- String head = new String(" o ******");
- String torso = new String("/|\\* ");
- String legs = new String("/ \\* ");
- String space1 = new String(" ");
- String space2 = new String(" ");
- String bund = new String("******");
- int loops = 5;
- int pre = loops;
- int post = 0;
- for(int i = 0; i < loops; i++){
- pre--;
- for(int n = 0; n < pre; n++){
- System.out.print(space1);
- }
- System.out.print(head);
- for(int n = 0; n < post; n++){
- System.out.print(space2);
- }
- System.out.println("*");
- for(int n = 0; n < pre; n++){
- System.out.print(space1);
- }
- System.out.print(torso);
- for(int n = 0; n < post; n++){
- System.out.print(space2);
- }
- System.out.println("*");
- for(int n = 0; n < pre; n++){
- System.out.print(space1);
- }
- System.out.print(legs);
- for(int n = 0; n < post; n++){
- System.out.print(space2);
- }
- post++;
- System.out.println("*");
- }
- for(int i = 0; i < loops; i++){
- System.out.print(bund);
- }
- }
- }
Add Comment
Please, Sign In to add comment