Question: C + + Lab 1 4 functions Write title lines for the functions that are called by the following main program. Do not supply the

C++ Lab 14 functions
Write title lines for the functions that are called by the following main program. Do not supply
the blocks for the functions. Your title lines must allow for any indicated types of output.
write the answer to this question in the submission textbox on brightspace
int main(){
cout firstDigit(65536) endl; // prints: Six
cout undouble(11223344); // prints: 1234
cout halfString("Freddy") endl; // prints: Fre
sort("Kelly", "Max", "Freddy", "Jack"); // prints: Freddy Jack Kelly Max
string a = randomWord(); // assigns a random value
return 0;
}
a. Title line for firstDigit
b. Title line for undouble
c. Title line for halfString
d. Title line for sort
e. Title line for randomWord
Write a function called sumRatios. The function has two integer parameters that are positive
and have the same number of digits all of which are non-zero. It prints the sum of the ratios
of corresponding digits. For instance sumRatios (132,568) calculates 1//5+3//6+2//8 and
returns an answer of 0.95.
Upload a complete C++ program that contains the main function below and your
sumRatios function as a single file on brightspace
int main(){
cout sumRatios(132,568) endl;
// prints 0.95
return 0;
}
C + + Lab 1 4 functions Write title lines for the

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!