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;
- int num4;
- int num5;
- int num6;
- cout << "The values are in the file: " << endl;
- cin >> num1;
- cin >> num2;
- cin >> num3;
- cin >> num4;
- cin >> num5;
- cin >> num6;
- ofstream outfile;
- outfile.open("data.txt");
- outfile << num1;
- outfile << num2;
- outfile << num3;
- outfile << num4;
- outfile << num5;
- outfile << num6;
- outfile.close();
- cout << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement