Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please do this question in C++. Please only in C++ solve these 3 parts. C Course what tax blabtas C Get Heb lahtas C1. This
Please do this question in C++. Please only in C++ solve these 3 parts.
C Course what tax blabtas C Get Heb lahtas C1. This C 1. This bonline + Online chego Home Write C Write C PlzLs bcheng C G H + c File C/Users/kunal/Desktop/CSCI%20225/Lab2_Recursions_4d5f5f213802959076437c25e5fe57ea.pdf To 2 of Q + OLD Page view A Read aloud | Add text lv Draw Highlight Erase + Lab tasks: 1. This problem considers several ways to compute x" for some n 2 0. 1) Write an iterative function power1 to compute x" for n 2 0. 2) Write a recursive function power2 to compute x" by using the following recursive formulation: x = 1; x1 = (x1/2)2 if n>0 and n is even; x"=x*(x1/2) if n>0 and n is odd. 2. Write a recursive binarySearch function for an array of strings (already sorted), that returns the indexes of all the strings whose first letter is "A" / "a". For example, for anArray = {"Arrow", "art", "box", "curve", "line"}, the search result should show: indexes = {0, 1). CSCI 225 - Lab 2 Page 1 5:44 PM ENG US 2022-01-27 0 C Course what is bx blab tas C Get Hoblab tas 1. This C 1. This bonline + Online chego Home Write C Write C PlzLs bcheng C G H + File C/Users/kunal/Desktop/CSCI%20225/Lab2_Recursions_4d5857213802959070437c25e5fe57ea.pdf To @ 2 2 of 2 Q + OD Page view A Read aloud | Add text IV Draw Highlight Erase + Columbia College - CSCI 225 Notes: You should set the target letter to be a variable, so thtwe can use your function to search strings starting with any given letter withing a-z/ A- Z. 3. Write a main() function that tests all the above functions, with two test cases for each function. You may create a menu of choices for user to choose which function to test. 5:44 PM ENG US 2022-01-27 0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started