(note that the bottom line should be shifted half character-width rightbut there' nothing we can do about that with character-mode graphics you can draw this tree using recursive makebranches(method with arguments left and rightwhich are the endpoints of horizontal range when you first enter the routineleft is and right is the number of characters (including dashesin all the linesminus you draw an in the center of this range then the method calls itself twiceonce for the left half of the range and once for the right half return when the range gets too small you will probably want to put all the dashes and xs into an array and display the array all at onceperhaps with display(method write main(program to draw the tree by calling makebranches(and display(allow main(to determine the line length of the display ( or whateverensure that the array that holds the characters for display is no larger than it needs to be what is the relationship of the number of lines (five in the picture hereto the line width implement the recursive approach to raising number to poweras described in the "raising number to powersection near the end of this write the recursive power(function and main(routine to test it write program that solves the knapsack problem for an arbitrary knapsack capacity and series of weights assume the weights are stored in an array hintthe arguments to the recursive knapsack(function are the target weight and the array index where the remaining items start implement recursive approach to showing all the teams that can be created from group ( things taken at timewrite the recursive showteams(method and main(method to prompt the user for the group size and the team size to provide arguments for showteam()which then displays all the possible combinations