Untitled

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

#include <iostream>
#include <iostream>
#include <stdio.h>
#include <string>
#include <ctime>
#include <fstream>

const string falename = "input.txt";


int main()
{
	ifstream fin(falename);
	if (!fin.is_open()) {
		cout << "error";
	}
	int n;
	fin >> n;
	int* mass = new int [n];
	int a;
	for (int i = 0; i < n; i++)
	{
		fin >> a;
		mass[i] = a;
		
	}
	for (int i = 0; i < n; i++)
	{
		cout << "mass[" << i << "]" << " - " << mass[i]<<"\n";
	}

	
	
	
}



Leave a Comment