(a) Write a program that begins by reading a radius, r from the user. The program will continue by computing and displaying the area of a circle with r and the volume of a sphere with radiusr. Declare pi as a constant in your calculations. Hint: The area of a circle is compound using the formula: area xr'. The volume of a sphere is computed using the formula: wlume= 4/3ar.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
QUESTION 2
(a) Write a program that begins by reading a radius, r from the user. The program will
continue by computing and displaying the area of a circle with r and the volume of a
sphere with radius r. Declare pi as a constant in your caleulations. Hint: The area of a
circle is compound using the formula: area xr'. The volume of a sphere is computed
using
the
formula:
welume=
4/3ar'.
(b) Create a program that determines how quickly an object is travelling when it hits
the ground. The user will enter the height from which the object is dropped in meters
(m). Because the object is dropped its initial speed is Om/s. Assume the acceleration
due to gravity is 9.8m/s. You can use the formula: "S = V +2
to
compute the final, vr, when the initial speed, vi acceleration ,a, and distance, d, are
known.
(c) You are required to create a program that reads a letter of the alphabet from the
user. If the user enters a, e, i, o or u then your program should display a message
indicating that the entered letter is a vowel. If the user enters y then your program
should display a message indicating that sometimes y is a vowel, and sometimes y is a
consonant. Otherwise your program should display a message indicating that the letter
is a constant.
Transcribed Image Text:QUESTION 2 (a) Write a program that begins by reading a radius, r from the user. The program will continue by computing and displaying the area of a circle with r and the volume of a sphere with radius r. Declare pi as a constant in your caleulations. Hint: The area of a circle is compound using the formula: area xr'. The volume of a sphere is computed using the formula: welume= 4/3ar'. (b) Create a program that determines how quickly an object is travelling when it hits the ground. The user will enter the height from which the object is dropped in meters (m). Because the object is dropped its initial speed is Om/s. Assume the acceleration due to gravity is 9.8m/s. You can use the formula: "S = V +2 to compute the final, vr, when the initial speed, vi acceleration ,a, and distance, d, are known. (c) You are required to create a program that reads a letter of the alphabet from the user. If the user enters a, e, i, o or u then your program should display a message indicating that the entered letter is a vowel. If the user enters y then your program should display a message indicating that sometimes y is a vowel, and sometimes y is a consonant. Otherwise your program should display a message indicating that the letter is a constant.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY