Advertisement
Guest User

Untitled

a guest
May 25th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //FOR (15 lines)
  2.  
  3. int tiskMaticeDoSouboru(FILE *soubor, struct mat *m)
  4. {
  5.     int i; //REMOVE "= 0" !!!!
  6.     int j; //...
  7.     for(i=0;i<m->pRadku;i++)
  8.     {
  9.         for(j=0;j<m->pSloupcu;j++)
  10.         {
  11.             fprintf(soubor,"%lf ", m->matice[i][j]);
  12.         }
  13.         fprintf(soubor,"\n");
  14.     }
  15.     fprintf(soubor,"\n");
  16.     return 0;
  17. }
  18.  
  19. //WHILE (19 lines)
  20.  
  21. int tiskMaticeDoSouboru(FILE *soubor, struct mat *m)
  22. {
  23.     int i;
  24.     int j;
  25.     i = 0;
  26.     while (i<m->pRadku)
  27.     {
  28.         j = 0;
  29.         while (j<m->pSloupcu)
  30.         {
  31.             fprintf(soubor,"%lf ", m->matice[i][j]);
  32.             j++;
  33.         }
  34.         fprintf(soubor,"\n");
  35.         i++;
  36.     }
  37.     fprintf(soubor,"\n");
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement