TGTGInsighttelegram intelligenceLIVE / telegram public index
← Computer Programming
Computer Programming avatar

TGINSIGHT POST

Post #386

@cpp_sirius

Computer Programming

Visninger378Antall visninger
Publisert11. des.11.12.2025, 16:40
Innhold

Innholdet i innlegget

// problem 8 ofstream fnum("numbers.txt"); int k; for (int i = 0; i < 100; i++) { k = rand() % 100+1; fnum << k << endl; } fnum.close(); ifstream fmax("numbers.txt"); int num, max = 0; while (fmax>>num) { if (max < num) { max = num; } } cout << max << endl; fmax.close();