Cod sursa(job #2137224)

Utilizator justsomedudePalade Thomas-Emanuel justsomedude Data 20 februarie 2018 17:53:30
Problema Hashuri Scor 0
Compilator c Status done
Runda Arhiva educationala Marime 1.13 kb

stare =  fseek(fid, deplasare, origine);
cnt = 0;
while (stare != eof)
{
   stare =  fseek(fid, 1, cnt);
   cnt++;
}

 fscanf("%d %d", cnt); /// dimensiunea fisierului

------------------------------------------------------------------------------------------------------------


  for (i=1...n)
      s=0;
      for (j=1...n)
         s += M(i,j)
       endfor
       lin(i) = s;
    endfor

    
    for (i=1...n)
       for (j=1...n)
         if (lin(i) != lin(j))
             ok = 1;
         endfor 
      endfor 
     if (ok == 1) printf  " ... "
  
     ^^^ verifica chestii

   for (j=1...n)
      s=0;
      for (i=1...n)
         s += M(i,j)
       endfor
       col(i) = s;
    endfor
  
    
    for (i=1...n)
       for (j=1...n)
         if (col(i) != col(j))
             ok = 1;
         endfor 
      endfor 
     if (ok == 1) printf  " ... "

---------------------------------------------------------------------------------------------------------------------

   n = input('introduceti variabila:')
   x = for [1 : 2 : n ]
   for i = 1 : length(x)
        s = s + x(i)