Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public class TavolaPitagorica {
  2. private int[] [] matrix;
  3.  
  4. public TavolaPitagorica(int k){
  5. matrix = new int[k][k];
  6. for(int y = 0; y < k; y++) {
  7. for (int x = 0; x < k; x++)
  8. matrix[y][x] = y * x;
  9. }
  10. public void stampa(){
  11. for(int i = 0; i < matrix.length; i++){
  12. System.out.print();
  13. }
  14. }
  15. }
  16.  
  17. public static void main(String args[]){
  18. TavolaPitagorica tab = new TavolaPitagorica(10);
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement