Untitled
user_2074942
plain_text
6 months ago
557 B
3
Indexable
int main() { srand(time(NULL)); int eni, uzunlugu, r, trace = 0; cout << "eni: "<<endl; cin >> eni; cout << "uzunlugu: " << endl; cin >> uzunlugu; r = eni * uzunlugu; for (int i = 1; i <= r; i++) { int random = rand() % 99; cout << random << " "; if ((i - 1) % (eni + 1)==0) { trace += random; } if (i % eni == 0) { cout << endl; } } cout << "trace = " << trace; return 0; }
Editor is loading...
Leave a Comment