#include <iostream>

using namespace std ;

// L'argument est passé par recopie ; la variable recopiée
// est une variable locale dont la fonction dispose librement.
void f1(size_t i) {
	while ( i -- > 0 )
		cout << '*' ;
}
// L'argument est passé par référence constante. C'est un argu-
// ment en entrée. La fonction alloue la variable automatique
// locale `j' comme compteur dans la boucle `for'.
void f2(const size_t & i) {
	for ( size_t j = 0 ; j < i ; ++ j ) {
		cout << '*' ;
	}
}
// L'équivalence entre les instructions `for' et `while'.
void f3(const size_t & i) {
	{
		size_t j = 0 ;
		while ( j < i ) {
			cout << '*' ;
			++ j ;
		}
	}
}

int main() {
	f1(10) ;
	cout << endl ;
	f2(12) ;
	cout << endl ;
	f3(6) ;
	return 0 ;
}
