daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Oct 22nd, 2018 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<iostream>
  2. #include<fstream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int num1;
  8.     int num2;
  9.     int num3;
  10.  
  11.     cout << "Enetr 3 values: " << endl;
  12.     cin >> num1;
  13.     cin >> num2;
  14.     cin >> num3;
  15.  
  16.     ifstream infile;
  17.     infile.open("c:\\number.txt");
  18.     infile >> num1;
  19.     infile >> num2;
  20.     infile >> num3;
  21.     infile.close();
  22.  
  23.     cout << "The data has been written to file." << endl;
  24.     cout << endl;
  25.     system("pause");
  26.     return 0;
  27. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top