Untitled

 avatar
unknown
c_cpp
a year ago
584 B
3
Indexable
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";
	}
	{

	}
	

	
	
}



     
Editor is loading...
Leave a Comment