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