Question
(1) Write a program that prints the ASCII Art elephant shown below. (2) Write a program that prompts the user to enter three numbers, then
(1) Write a program that prints the ASCII Art elephant shown below. (2) Write a program that prompts the user to enter three numbers, then print the sum and product of these numbers. (3) Write a program that prompts the user to enter a radius. Using this radius, print the area of a circle, the volume of a sphere, and the surface area of a sphere. Submit the .cpp source code file(s) on Ecampus. Extra Credit (difficult): If you include time.h, you can get the number of seconds that have elapsed since Jan. 1, 1970, using the time(NULL). Write a program that calculates the current date and time using this number. You cannot use any other functions other than time(NULL).
Below is a sample output for this homework assignment. Your output does not need to be identical, but it will give you an idea of what to do. Remember that you will also need to include the source code for each program.
Program 1 Output
/ \~~~/ \ ,----( .. ) / \__ __/ /| (\ |( ^ \ /___\ /\ | hjw |__| |__|-" `97
Program 2 Output This program calculates the sum and product of three numbers. Enter the first number: 2.1 Enter the second number: 3 Enter the third number: 5.5 The sum of these three numbers is 10.6 The product of these three numbers is 34.65
Program 3 Output This program calculates the area of a circle and the volume of a sphere. Enter a radius in inches: 3.3 The area of a circle is 34.21 square inches The volume of a sphere is 150.53 cubic inches The surface area of a sphere is 136.85 square inches
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