HayCZ

izapr_Zapocet_Program

Apr 27th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1. package zapocettest01;
  2.  
  3. public class ZapocetTest01 {
  4.  
  5.     /**
  6.      * @param args the command line arguments
  7.      */
  8.     public static void main(String[] args) {
  9.         // TODO Doplnte vytvareni instanci tridy Matice a overte implementovane metody
  10.  
  11.         Matice m = new Matice(5);
  12.         m.naplnMatici(-5, 5);
  13.         System.out.println("Originální matice: \n" + m.toString());
  14.         System.out.println("Dej vedlejší diagonálu:");
  15.         for (int i = 0; i < m.dejVedlejsiDiagonalu().length; i++) {
  16.             System.out.print(m.dejVedlejsiDiagonalu()[i] + " ");
  17.         }
  18.         System.out.println();
  19.         System.out.println("Souřadnice matice: \n " + Matice.vytvorPodleIndexu(5, 5).toString("%5.1f"));
  20.         System.out.println("Transponovaná matice:\n" + m.transpose().toString());
  21.  
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment