#include #include int main(void){ int k, n, emased, isased, i; int massiiv[1000]; massiiv[0] = 10; isased = 10; emased = 0; srand(time(0)); for(k=1; k<16; k++){ for(i=1; i<11; i++){ n = (rand()%2 + 1); emased = emased + n; isased = isased + (3 - n); } massiiv[k]=emased; emased = 0; } emased = 0; for(k=1; k<19; k++){ if(k>3){ for(i=1; i<(massiiv[1] + 1); i++){ n = (rand()%2 + 1); emased = emased + n; isased = isased + (3 - n); } } else {emased = 0;} if(k>15){ massiiv[k]=0; } massiiv[k]=massiiv[k] + emased; emased = 0; } for(k=0; k<19; k++){ printf("%d. kuul - emaseid : %d\n",k * 4, massiiv[k]); } return 0; }