Untitled

mail@pastecode.io avatar
unknown
c_cpp
2 months ago
584 B
0
Indexable
Never
using namespace std;

#include <iostream>
#include <iostream>
#include <stdio.h>
#include <string>
#include <ctime>
#include <fstream>
const string filename = "input.txt";
void pisun(int mass[], int& n) {
	ifstream in(filename);
	if (!in.is_open()) {
		cout << "ERRor";
	}

	in >> n;
	int a;

	for (int i = 0; i < n; i++)
	{
		in >> a;
		
		mass[i] = a;
		
	}
	in.close();
}


int main()
{
	int mass[111];
	int n;
	pisun(mass, n);
	for (int i = 0; i < n; i++) {
		cout << "mass["<<i<<"]"<<"-"<<mass[i]<<"\n";
	}
	{

	}
	

	
	
}



     
Leave a Comment