Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
438 B
0
Indexable
Never
#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;
	}
}
Leave a Comment