1234567891011121314151617181920212223242526
#include<iostream> #include<fstream> using namespace std; int main() { ifstream inputFile; int number; inputFile.open("Num.txt"); if (inputFile) { while (inputFile >> number) { cout << number << endl; } inputFile.close(); } else { cout << "file didn't open" << endl; } return 0; }