Computer Programming
mock_final102.pdf
Guys!
I tried my best to prepare this mock.
However, I can not say the real exam will be exactly like this.
So do not think this is a real exam
I tried my best to prepare this mock.
However, I can not say the real exam will be exactly like this.
So do not think this is a real exam
❤8🔥6🕊2
‼️Pay attention ‼️
Tomorrow we are going to organize an extra lesson!
@cpp_sirius👨💻
Tomorrow we are going to organize an extra lesson!
💻 Computer Programming
🗓️ Thursday, 11th December
🕓 Time: 21:00
🧩 File Handling
@cpp_sirius👨💻
❤12👍1🔥1
Computer Programming
‼️Pay attention ‼️ Tomorrow we are going to organize an extra lesson! 💻 Computer Programming 🗓️ Thursday, 11th December 🕓 Time: 21:00 🧩 File Handling @cpp_sirius👨💻
🎓Students
The lesson will be 1 hour before at 20:00⏰
Please be aware and ready
The lesson will be 1 hour before at 20:00⏰
Please be aware and ready
❤3👌2👍1
Computer Programming
🎓Students The lesson will be 1 hour before at 20:00⏰ Please be aware and ready
🙏So sorry guys.
I will be late about 30 minutes.
Be tuned ✅
I will be late about 30 minutes.
Be tuned ✅
👍1
// 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();
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();
Forwarded from Computer Programming 1
week14.pdf
107.9 KB
This week lab: File handling & structure.
It is lab work (not graded)
It is lab work (not graded)