Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- //файлы 4.7
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main() {
- setlocale(LC_ALL, "rus");
- ofstream a("input.dat", ios::binary);
- int b, c, n;
- cout << "Введите кол-во чисел и диапазон\n";
- cin >> n >> b >> c;
- for (int i = 0; i < n; ++i) {
- int ch;
- cin >> ch;
- a.write((char*)&ch, sizeof(int));
- }
- a.close();
- ifstream aa("input.dat", ios::binary);
- int ch;
- while (aa.read((char*)&ch, sizeof(int))) {
- if (ch >= b && ch <= c)
- cout<<ch<<" ";
- }
- aa.close();
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement