Write a program that reads in two numbers a and b. The program should calculate the following expressions and display the results to the user Sum= a+b Fun1= b+ 8 a2 + 10 Fun2= 5 va? + b2
Write a program that reads in two numbers a and b. The program should calculate the following expressions and display the results to the user Sum= a+b Fun1= b+ 8 a2 + 10 Fun2= 5 va? + b2
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...
Related questions
Question
100%
C++ and I need help with program 2
![### Educational Website: Programming Assignment
#### Task Overview
1. **Build and Run the Program**
- Input the radius to compute and output the volume and surface area of a sphere.
**Example Run:**
- For `radius = 5.2`, calculate and display the volume and surface area.
2. **Document the Output**
- Capture a screenshot of your output and include it in your word document.
- Copy your program into the same document.
- Repeat these steps for `Program2`, inputting values for `a` and `b`, and output `Sum`, `Fun1`, and `Fun2`.
**Example Run:**
- For `a = -2.5`, `b = 7.4`, calculate and display `Sum`, `Fun1`, and `Fun2`.
3. **Submit Your Work**
- Upload your completed document to the test portal and submit.
---
#### Program1
Develop a program that reads the radius of a sphere and calculates its volume and surface area. Ensure all results are formatted to four decimal places.
---
#### Program2
Create a program that reads two numbers, `a` and `b`. The program should compute and display the following expressions:
- **Sum**:
\[
\text{Sum} = a + b
\]
- **Fun1**:
\[
\text{Fun1} = b^2 + 8a^2 + 10
\]
- **Fun2**:
\[
\text{Fun2} = 5 \sqrt{a^2 + b^2}
\]
---
#### Note
- Ensure you follow the instructions precisely to achieve accurate results.
- Your submission should include both the source code and the output for each program.
**Attach File:** Follow the on-screen instructions to upload your document.
**Saving:** Click "Save and Submit" after completing the task to ensure your answers are recorded.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F83d24965-dcea-4391-bbf1-79d44019cf99%2F40ec238a-ee2b-457a-9964-d61432288422%2F0n6p3_processed.jpeg&w=3840&q=75)
Transcribed Image Text:### Educational Website: Programming Assignment
#### Task Overview
1. **Build and Run the Program**
- Input the radius to compute and output the volume and surface area of a sphere.
**Example Run:**
- For `radius = 5.2`, calculate and display the volume and surface area.
2. **Document the Output**
- Capture a screenshot of your output and include it in your word document.
- Copy your program into the same document.
- Repeat these steps for `Program2`, inputting values for `a` and `b`, and output `Sum`, `Fun1`, and `Fun2`.
**Example Run:**
- For `a = -2.5`, `b = 7.4`, calculate and display `Sum`, `Fun1`, and `Fun2`.
3. **Submit Your Work**
- Upload your completed document to the test portal and submit.
---
#### Program1
Develop a program that reads the radius of a sphere and calculates its volume and surface area. Ensure all results are formatted to four decimal places.
---
#### Program2
Create a program that reads two numbers, `a` and `b`. The program should compute and display the following expressions:
- **Sum**:
\[
\text{Sum} = a + b
\]
- **Fun1**:
\[
\text{Fun1} = b^2 + 8a^2 + 10
\]
- **Fun2**:
\[
\text{Fun2} = 5 \sqrt{a^2 + b^2}
\]
---
#### Note
- Ensure you follow the instructions precisely to achieve accurate results.
- Your submission should include both the source code and the output for each program.
**Attach File:** Follow the on-screen instructions to upload your document.
**Saving:** Click "Save and Submit" after completing the task to ensure your answers are recorded.
Expert Solution

Step 1
The above program calculate a2 using the pow function in c++.
Square root can be find using the sqrt function in c++.
Using these functions calculate the Fun1 and Fun2.
Step by step
Solved in 3 steps with 1 images

Recommended textbooks for you

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

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 Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

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
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY