cs161/assignments/assignment5/recur_fractals.cpp
/*********************************************************************
 * ** Function: pattern
 * ** Description: This function takes n and i as parameters and prints a recursive fratal based on those inputs
 * ** Parameters: int n and int i
 * ** Pre-Conditions: user inputs number of stars and spaces
 * ** Post-Conditions: prints recursive fractal
 * *********************************************************************/
pattern
Description: This function takes n and i as parameters and prints a recursive fratal based on those inputs
Parameters: int n and int i
Pre-Conditions: user inputs number of stars and spaces
Post-Conditions: prints recursive fractal
pattern Description : This function takes n and i as parameters and prints a recursive fratal based on those inputs Parameters : int n and int i Pre - Conditions : user inputs number of stars and spaces Post - Conditions : prints recursive fractal
void pattern(int n, int i) {
	if(n == 0) return;
	else pattern(n/2, i);
	for (int k = 0; k < i; k++) cout << "  ";
	for (int k = 0; k < n; k++) cout << "* ";
	cout << endl;
	pattern(n/2, i + n/2);
}
void pattern ( int n , int i ) { if ( n == 0 ) return ; else pattern ( n / 2 , i ) ; for ( int k = 0 ; k < i ; k ++ ) cout << " " ; for ( int k = 0 ; k < n ; k ++ ) cout << " " ; cout << endl ; pattern ( n / 2 , i + n / 2 ) ; }
** Function: pattern
 ** Description: This function takes n and i as parameters and prints a recursive fratal based on those inputs
 ** Parameters: int n and int i
 ** Pre-Conditions: user inputs number of stars and spaces
 ** Post-Conditions: prints recursive fractal
** Function : pattern ** Description : This function takes n and i as parameters and prints a recursive fratal based on those inputs ** Parameters : int n and int i ** Pre - Conditions : user inputs number of stars and spaces ** Post - Conditions : prints recursive fractal