Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- int main() {
- ofstream myfile;
- int input;
- char text = ' ';
- myfile.open("pi.txt");
- cout << "Zadej pocet desetinnych mist pro zobrazeni iracionalniho cisla pi: ";
- cin >> input;
- cout << endl << "3,";
- for (int i = 0; i < input; i++)
- {
- myfile >> text;
- cout << text;
- }
- cout << endl;
- system("pause");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment