Untitled
unknown
c_cpp
7 months ago
381 B
0
Indexable
Never
#include <iostream> #include <fstream> using namespace std; const string filename = "input.txt"; void read(int& n) { ifstream in(filename); if (!in.is_open()) { cout << "error"; return; } int a; in >> n; for (int i = 0; i < n; i++) { in >> a; cout << a << endl; } in.close(); } int main() { int n; int a; read(n); //cout << n; }
Leave a Comment