Untitled
unknown
c_cpp
a year ago
438 B
3
Indexable
#include <iostream> #include <fstream> #include <string> using namespace std; const string name = "Asd.txt"; void chi(int mas[], int mac[], int &size) { ifstream c(name); c >> size; for (int i = 0; i < size; i++) { c >> mas[i] >> mac[i]; } c.close(); } int main() { int size; int mas[122], mac[122]; chi(mas, mac, size); for (int i = 0; i < size; i++) { cout << mas[i] << " " << mac[i] << endl; } }
Editor is loading...
Leave a Comment