Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <stdio.h> // подключаем функции дл работы с файлами
- #include <conio.h> // подключам getch
- #include <cmath>
- #include <string>
- using namespace std;
- int main(int argc, char* argv[])
- {
- setlocale(LC_ALL, "rus");
- ifstream f1;
- ofstream f;
- int n;
- cout << "Введите кол-во степеней тройки которые надо вывести на экран:";
- cin >> n;
- f.open("output.dat", ios::binary);
- int x = 3;
- for (int i = 0; i < n; i++)
- {
- f.write((char*)(&x), sizeof(x));
- x *= x;
- }
- f.close();
- f1.open("output.dat", ios::binary);
- while()
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement