Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HelloWorld
- {
- public static void main(String[] args)
- {
- int n =5;
- for(int i=n-1; i>=0; i--)
- {
- for(int j=0; j<n; j++)
- {
- if(j>=i)
- System.out.print("o");
- else
- System.out.print("_");
- }
- System.out.println();
- }
- for(int i=1; i<=n-1; i++)
- {
- for(int j=0; j<n; j++)
- {
- if(j>=i)
- System.out.print("o");
- else
- System.out.print("_");
- }
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement