Advertisement
Guest User

Untitled

a guest
May 27th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.74 KB | None | 0 0
  1. while (j<4) {
  2.         while (count[j]>0) {
  3.             otn[i] = cen[j]/w[j];
  4.             stoim[i] = cen[j];
  5.             ves[i] = w[j];
  6.             met[i] = metall[j];
  7.             i++;
  8.             count[j] = count[j] - 1;
  9.         }
  10.         j++;
  11.     }
  12.  
  13.     while (kon != 4) {
  14.         r = 0;
  15.         for (i=0 ; i<Q ; i++) {
  16.             if ((otn[i]<max1) && (otn[i]>max2)) max2 = otn[i];
  17.         }
  18.         for (i=0 ; i<Q ; i++) {
  19.             if (otn[i] == max2) {
  20.                 r++;
  21.                 I[f] = otn[i];
  22.                 stoim2[f] = stoim[i];
  23.                 ves2[f] = ves[i];
  24.                 met2[f] = met[i];
  25.                 f++;
  26.             }
  27.         }
  28.         max1 = max2;
  29.         max2 = -1;
  30.         kon++;
  31.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement