# The square root values should be outputted to two decimal places

The square root values should be outputted to two decimal places CSC-210, Homework #4 1. Write a program that uses a loop to output the numbers 1-10, and their corresponding square roots, along with the column headings of ‘N’ and ‘Square Root’. The tab escape character (‘ ‘) should be used to line up the columns. The square root values should be outputted to two decimal places. Note: you should complete this program by modifying the sqrt.cpp program on Blackboard, which contains code that handles the formatting of the output. When you run your code, your output should match the output below. N Square Root 1 1.00 2 1.41 3 1.73 4 2.00 5 2.24 6 2.45 7 2.65 8 2.83 9 3.00 10 3.16 2. Write a C++ statement or statements that a. Generates a random number between 1 and 100 (including 1 and 100) b. Generates a random number between 10 and 20 (including 10 and 20) 3. What is the output of the program below (which continues on the next page)? #include <iostream>using namespace std;double divide (double num1, double num2);int main() {cout << divide(8,2) << endl;cout << divide(2,8) << endl;double num1 = 4, num2 = 2;cout << divide(num1, num2) << endl;cout << divide(num2, num1) << endl;return 0;}// divides num1 by num2double divide(double num1, double num2) {return (num1 / num2);}4. Write a program that takes two numbers entered by the user, and prints out the maximum number entered. In order to do this, you must write a function that takes as input two values of type double, and returns the maximum value, and use this function. The function itself does not output anything. For example, if the user enters -10 and 15, the program should output: The maximum value entered is 15. Note: the function should correctly handle cases where two or more numbers are the same. For example, check that your program runs correctly for the numbers 7 and 7. 5. Recall that the determinant of a quadratic equation ! + + = 0 is equal to ! − 4. Write a program that prompts the user to enter values for ,and , calculates the determinant, and then tells the user how many solutions there are to the quadratic equation. (Recall that if the determinant is 0, there is ONE real number solution, if the determinant is positive, there are TWO real number solutions, and if the determinant is negative, there are NO real number solutions). In order to do this, you must write the function definition for a function called determinant that returns the determinant for given values of , and , and use this function. The function declaration is given below: double determinant (double a, double b, double c);