Untitled
unknown
c_cpp
a year ago
520 B
5
Indexable
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"; } }
Editor is loading...
Leave a Comment