4. Write expressions to compute both solutions for the quadratic formula. The formula is
The ± means plus or minus and indicates that there are two solutions to the equation: one in which the result of the square root is added to -b and one in which the result is subtracted from -b. Assume all variables are float variables.
5. Complete the following C++ program. The program should find and output the perimeter and area of a rectangle, given the length and the width. Be sure to label the output. And don't forget to use comments.
//***********************************************
// Rectangle program
// This program finds the perimeter and the area
// of a rectangle, given the length and width
//***********************************************
#include <iostream.h>
int main()
{
float length; // Length of the rectangle
float width; // Width of the rectangle
float perimeter; // Perimeter of the rectangle
float area; // Area of the rectangle
length = 10.7;
width = 5.2;
6. Write C++ output statements that produce exactly the following output.
a. Four score
and seven years ago
b. Four score
and seven
years ago
c. Four score
and