Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaapplication4;
- import java.util.Scanner;
- public class JavaApplication4 {
- public static void main(String[] args)
- {
- for(int i=1;i<=5;i++){
- for(int j=1;j<=5;j++){
- if(i==j || j==6-i){
- System.out.print("*");
- }
- else{
- System.out.print(" ");
- }
- }
- System.out.println();
- }
- }
- }
Add Comment
Please, Sign In to add comment