Abdullah047

assignment4-quesition2

Nov 18th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1.  
  2.  
  3. public class practice2 {
  4. public static void main(String[] args) {
  5. for(int i=1;i<=5;i++){
  6. for(int j=1;j<=10;j++){
  7. if(i==1||i==3||i==5){
  8. System.out.print("*");
  9. }
  10.  
  11.  
  12. else if(j%2==0){
  13. System.out.print("0");
  14.  
  15.  
  16. }
  17. else{
  18. System.out.print("*");
  19.  
  20. }
  21. }
  22. System.out.print("\n");
  23. }
  24. }
  25. }
Add Comment
Please, Sign In to add comment