Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<fstream>
- using namespace std;
- int main()
- {
- int num1;
- int num2;
- int num3;
- cout << "Enetr 3 values: " << endl;
- cin >> num1;
- cin >> num2;
- cin >> num3;
- ifstream infile;
- infile.open("c:\\number.txt");
- infile >> num1;
- infile >> num2;
- infile >> num3;
- infile.close();
- cout << "The data has been written to file." << endl;
- cout << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement