Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in C++ the first part it is the int main... do the function based off the parameters and show the output. Do both func8 and
in C++ the first part it is the int main... do the function based off the parameters and show the output. Do both func8 and func7
/*************************************************** func8: (5pts) * write a function that takes as input: * a string, * the length of the string, * an array of integers, * and the length of the array of numbers. * The function returns: * nothing * For each of the numbers in the array of numbers, the function adds up the * digits in the number. It then calculates an index into the string(s6, below) by * finding the remainder when dividing by the string size. * So if the string is: * "grandma" * the length of the string is 7. * Say the number in the array of numbers is 5497 * Adding the digits results in 25 . * If we divide by 7 , the remainder is 3 . * So the resulting character would be ' n ' (which is at index 3 in the string) * The function should print out the letter in the string at that index. * Point: number manipulation / void func8(string s, int len, int arr [] , int len2) \{ /* write function definition here */ \}
Step 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