Department of Computer Science | Institute of Theoretical Computer Science | CADMO

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// Program: read_array.cpp // read a sequence of n numbers into an array #include int main() { // input of n unsigned int n; std::cin >> n; // dynamically allocate array int* const a = new int[n]; // read into the array for (int i=0; i> a[i]; // output what we have for (int i=0; i