Advertisement
vinedfs

Exemplo de Matriz

Jun 25th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. int contador1 = 0;
  2. int contador2 = 0;
  3. int tamanho = 5;
  4.  
  5. while(contador1 < tamanho) {
  6. while(contador2 < tamanho) {
  7. System.out.print(" * ");
  8. contador2 ++;
  9. }
  10. contador1 ++;
  11. contador2 = 0;
  12. System.out.println();
  13. }
  14.  
  15. Output (saída no console):
  16.  
  17. * * * * *
  18. * * * * *
  19. * * * * *
  20. * * * * *
  21. * * * * *
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement