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

Theory of Combinatorial Algorithms

Prof. Emo Welzl and Prof. Bernd Gärtner

// Program: fill.cpp // define and use a function to fill an array #include // PRE: a[0],...,a[n-1] are elements of an array // POST: a[i] is set to value, for 0 <= i < n void fill_n (int a[], const int n, const int value) { for (int i=0; i