Advertisement
robonx12

Untitled

Feb 5th, 2015
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.85 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <time.h>
  4.  
  5. int main (int argc, char * argv[])
  6.     {
  7.         printf("Dobry den docente Kovare. \nMate 100 ms na spocitani determinantu kazde z nasledujicich matic.\nGL.");
  8.         Sleep(6000);   
  9.         int x = atoi(argv[1]), matice [x-1][x-1], i = 0, y = 0, kovar = 0;
  10.         for (kovar; kovar < 10; kovar ++)
  11.             {
  12.                 srand(time(NULL));
  13.                 system("cls");
  14.                 printf("%d. matice.\n", kovar + 1);
  15.                 for (i = 0; i < x; i++)
  16.                     {
  17.                         if (i != 0) printf("\n");
  18.                         for (y = 0; y < x; y++)
  19.                             {
  20.                                 Kovar:
  21.                                 matice [i][y] = rand();
  22.                                 if (matice [i][y] > 9) goto Kovar;
  23.                                 printf("%d ", matice [i][y]);
  24.                             }
  25.                         Sleep(100);    
  26.                     }
  27.                 Sleep(100);        
  28.             }
  29.         system("cls"); 
  30.         printf("Pokud jsi to nestihl tak to nevadi.\nStaci mi, pokud budu mit ze zkousky 24b.\nDobrou.");
  31.         return 0;
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement