Write a program to do the following:
(A) Ask the user to enter 5 characters and store these in 5 char variables named c1, c2, c3, c4, c5.
(B) Perform a cyclic exchange of values stored in the 5 variables:
c1 must hold the value given by the user and initially stored in c2,
c2 must hold the value given by the user and initially stored in c3,
c3 must hold the value given by the user and initially stored in c4,
c4 must hold the value given by the user and initially stored in c5,
and c5 must hold the value given by the user and initially stored in c1.
(C) Print the values of the variables once the exchange is done.
Write a program which computes the areas of rectangles and circles. In particular:
(A) The first part of the program asks the user to enter two floating-point numbers, which are stored in variables L and W. Then, it computes and prints the area of a rectangle of length L and width W. Recall that the area of such rectangle is equal to L * W.
(B) The second part of the program asks the user to enter one floating-point number, which is stored in the variables D. Then, it computes and prints the area of a circle with diameter D. Recall that the area of a circle is PI * R2, where PI = 3.14159 and R is the radius of the circle which is half of the diameter.
Write a program which is able to solve quadratic equation ax2 + bx + c = 0. In particular, the program asks the user to enter the parameters a, b, and c. Then, it computes the discriminant D = b2 - 4ac and the two solutions (-b + sqrt(D)) / 2a and (-b - sqrt(D)) / 2, which are printed.