C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Question
Chapter 3.4, Problem 9E
Program Plan Intro
pow() is used to calculate the value of a raised to the power b i.e. ab.
Program Description: Purpose of the program is to calculate and display the fourth root of a userenterednumber using the pow() function.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
(Guess the Number Modification) Modify the program of Exercise 5.32 to count the number of guesses the player makes. If the number is 10 or fewer, print Either you know the secret oryou got lucky! If the player guesses the number in 10 tries, then print Ahah! You know the secret!If the player makes more than 10 guesses, then print You should be able to do better! Why shouldit take no more than 10 guesses? Well, with each “good guess” the player should be able to eliminatehalf of the numbers. Now show why any number 1 to 1000 can be guessed in 10 or fewer tries.
(Integer) Bit Operators. Write a program that takes begin and end values and prints out a decimal, binary, octal, hexadecimal chart like below. If any of the characters are printable ASCII characters, then print those, too. If none is, you may omit the ASCII column header.
(Use screenshots)
In this homework assignment I will provide you with pseudo code that describes what your program should do. Include the pseudo code in your source file as comments. Below each line of pseudo code fill in the ASSEMBLY LANGUAGE instructions to accomplish the tasks.
Pseudo code for homework 5:
Display your first and last name
Add the numbers 2 and 7.
Display the result.
Multiply the numbers 3 and 2.
Display the result.
Logically AND the numbers 42 and 7.
Display the result Logically OR the number 5 and 2.
Display the result.
Perform the following mathematical expression:
A = 24
B = 13
C = 3
( A - B ) * C
Save the result of this calculation in R0 and cleanly exit your program.
The result should be visible if you type echo $? on the command line after you execute your program.
The output of your program should look like the following:
John Doe
9
6
2
7
Chapter 3 Solutions
C++ for Engineers and Scientists
Ch. 3.1 - (General math) Write an assignment statement to...Ch. 3.1 - (General math) Write an assignment statement to...Ch. 3.1 - (Conversion) Write an assignment statement to...Ch. 3.1 - Prob. 4ECh. 3.1 - (Physics) Write an assignment statement to...Ch. 3.1 - (Numerical) Write an assignment statement to...Ch. 3.1 - (Civil eng.) Write an assignment statement to...Ch. 3.1 - (Physics) Coulomb’s Law states that the force, F,...Ch. 3.1 - (Civil eng.) Write an assignment statement to...Ch. 3.1 - (Desk check) Determine the output of the following...
Ch. 3.1 - (Debug) Determine and correct the errors in the...Ch. 3.1 - Prob. 12ECh. 3.1 - Prob. 13ECh. 3.1 - (General math) The area of an ellipse (see Figure...Ch. 3.1 - Prob. 15ECh. 3.2 - Prob. 1ECh. 3.2 - Prob. 2ECh. 3.2 - (Practice) Write a C++ program that displays the...Ch. 3.2 - Prob. 4ECh. 3.2 - Prob. 5ECh. 3.2 - Prob. 6ECh. 3.2 - Prob. 7ECh. 3.2 - Prob. 8ECh. 3.2 - (Electrical eng.) The combined resistance of three...Ch. 3.2 - Prob. 10ECh. 3.2 - Prob. 11ECh. 3.2 - (Civil eng.) Write a C++ program to calculate and...Ch. 3.3 - Prob. 1ECh. 3.3 - Prob. 2ECh. 3.3 - (Practice) Write C++ statements for the following:...Ch. 3.3 - Prob. 4ECh. 3.3 - (General math) Write, compile, and run a C++...Ch. 3.3 - (General math) If a 20-foot ladder is placed on...Ch. 3.3 - (Physics) The maximum height reached by a ball...Ch. 3.3 - (Transportation) Road construction requires...Ch. 3.3 - Prob. 9ECh. 3.3 - Prob. 10ECh. 3.3 - Prob. 11ECh. 3.3 - Prob. 12ECh. 3.4 - Prob. 1ECh. 3.4 - (Practice) a. Write a C++ program that first...Ch. 3.4 - Prob. 3ECh. 3.4 - Prob. 4ECh. 3.4 - Prob. 5ECh. 3.4 - Prob. 6ECh. 3.4 - (General math) a. Write, compile, and run a C++...Ch. 3.4 - Prob. 8ECh. 3.4 - Prob. 9ECh. 3.4 - (Electrical eng.) For the series circuit shown in...Ch. 3.4 - Prob. 11ECh. 3.4 - Prob. 12ECh. 3.4 - Prob. 13ECh. 3.5 - Prob. 1ECh. 3.5 - Prob. 2ECh. 3.5 - Prob. 3ECh. 3.5 - Prob. 4ECh. 3.5 - Prob. 5ECh. 3.6 - Prob. 1ECh. 3.6 - (General math) The value of p can be approximated...Ch. 3.6 - Prob. 3ECh. 3.6 - (General math) The volume of oil stored in an...Ch. 3.6 - Prob. 5ECh. 3.6 - (General math) The perimeter, approximate surface...Ch. 3.6 - Prob. 7ECh. 3.6 - Prob. 8ECh. 3.6 - Prob. 9ECh. 3 - (General math) a. Write a C++ program to calculate...Ch. 3 - General math) a. Write a C++ program to calculate...Ch. 3 - (General math) Modify the program written for...Ch. 3 - (Biology) The number of bacteria, B, in a culture...Ch. 3 - Prob. 5PPCh. 3 - (Heat transfer) The formula developed in Exercise...Ch. 3 - Prob. 7PPCh. 3 - (Electrical eng.) a. The voltage gain of an...Ch. 3 - (Electrical eng.) a. Write, compile, and run a C++...Ch. 3 - (Electrical eng.) The amplification of electronic...Ch. 3 - (Acoustics) The loudness of a sound is measured in...Ch. 3 - (General math) a. A balance has the following...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- (Removing break and continue ) A criticism of the break statement and the continue statement is that each isunstructured. Actually, these statements can always be replaced by structured statements, although doing so can beawkward. Describe in general how you’d remove any break statement from a loop in a program and replace it with some structured equivalent. [Hint: The break statement exits a loop from the body of the loop. The other way to exit is by failing the loop-continuation test. Consider using in the loop-continuation test a second test that indicates “early exit because of a ‘break’ condition.”] Use the technique you develop here to remove thebreak statement from the application.arrow_forward(Computer mini-project) Area of a unit circle equals rt. Cover a circle with a 2 by 2 square and follow Algorithm 5.5 to estimate number Tt based on 100, 1,000, and 10,000 random numbers. Compare results with the exact value t = 3.14159265358... and comment on precision. %3D Please build an algorithm, test it and explain the results. Please include code. 351 /5,000arrow_forward(Use DevC++) 1. Concert Tickets Sale and Charity Donation Program Design and implement a program that prompts the user to input the concert name, ticket price,number of tickets sold, and percentage of the gross amount to be donated to the charity. The sampleoutput is as shown below: Sample Output:**************************************************************************Concert Name: ………………………………..… The Concert at the ParkTicket Price: …………………………………..… P 49.75Number of Tickets Sold: ………………….…. 5,985 pcs.Gross Amount: ………………………………….. P 297, 753.75Percent of Gross Amount Donated: ……… 13.00%Amount Donated: …………………………..…. P 38, 707. 9875Net Sale: ………………………………………….. P 259, 045.7625************************************************************************** Note that the concert name such as “The Concert at the Park” must be declared as String. Input: Concert Name, Ticket Price, Number of Tickets Sold, and Percent of Gross Amount Donated Output: see sample output abovearrow_forward
- (java programming language) Given f(x) = x+ x2/2+ x3/3+…… xn/n. Using do-while, write a program to compute f(x) for given x andn. The user should enter x and a positive integer n. Save your file as Q3.Javaarrow_forward3. (Tabular Output) Write a Java application that uses looping to print the following table of(Exercise 4.22) values: 1 4 9 16 25 1 8 27 64 125 1 16 81 256 625arrow_forward(C PROGRAMMING ONLY) 2. Odd Lifeby CodeChum Admin In life, anything can happen. Yesterday we're happy, tomorrow we're sad. One moment we're up, the next we're down. Life's odd. But that's what makes it beautiful ? In this program, let's try displaying all the odd numbers of our array, life, but with the use of functions! Instructions: In the code editor, you are provided with an array called, life. Furthermore, in the main(), a function call was made to the function displayOdd() where the array life was passed as well as the size of life which is 90.Your task is to declare and define the function displayOdd() which has the following details:Return type - voidName - displayOddParametersint* - an arrayint - the size of the arrayDescription - displays all the odd numbers found in the array passed, starting from the end. Output Odd element at index 80: 33Odd element at index 77: 69Odd element at index 76: 17Odd element at index 73: 15Odd element at index 69: 101....arrow_forward
- (PYTHON PLEASE) Also I was made aware that I can only ask one question and this question requires four different programs so please provide code for Pattern D. Thank you. (Display four patterns using loops) Use nested loops that display the following patterns in four separate programs:arrow_forward(Java) Write a program that allows the user to enter a number of integers until the user inputs zero. (0) The program then prints the total number of positive, negative, even and odd integers that I’ve been entered. Your program should also print the sum and average of the input values (not counting zeros) The average should be rounded to 2 decimal placesarrow_forward(Simple computation) The formula for computing the discriminant of a quadratic equation ax^2 + bx +c = 0 is b^2 - 4ac. Write a program that computes the discriminant for the equation 3x^2 + 4x + 5 = 0. Class Name: Exercise01 01Extra If you get a logical or runtime error, please refer https://liveexample.pearsoncmg.com/faq.html. Enter your code Code Analysis: Compiler Error(s) Compiler error messagesarrow_forward
- (CP) Write a program that reads in an m by n matrix (m row by n column), then reads in an n by p matrix (n row by p column), and then computes the product matrix and displays the two matrices as well as their product matrix on the screen.arrow_forward(Python)(Display four patterns using loops) Use nested loops that display the following patterns in four separate programs: *TUTOR INSTRUCTIONS* I have the code for all four patterns but for some reason the code is going downward instead of horizontally as shown in the provided image. Could you please just double check my coding and see how I can make it horizontal or if I need to seperate each pattern a certain way. The coding for this problem is: def numpat(n):# initialising starting numbernum = 1# outer loop to handle number of rowsfor i in range(0, n):# re assigning numnum = 1# values changing acc. to outer loopfor j in range(0, i + 1):print(num, end=" ")num = num + 1# ending line after each rowprint("\r")n = 6numpat(n)# iterate from 6 to 1for i in range(6, 0, -1):# iterate from 1 to i+1# since end value is exclusive, so adding 1 to ifor j in range(1, i + 1):# print current value of j# set end to a space to print space after each valueprint(j, end=' ')# change the line after each…arrow_forward(java programming language) Write a program to read and store four student’s 21SP registered course and their grade point, sortthem into an order their 21SP registered course, based on grade point from the smallest to the largest,then print them out. The student’s 21SP registered course and their grade point values should be typedin by the user in response to a prompt message. Save the file as SortCourse_yourID.javaarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
Boolean Algebra - Digital Logic and Logic Families - Industrial Electronics; Author: Ekeeda;https://www.youtube.com/watch?v=u7XnJos-_Hs;License: Standard YouTube License, CC-BY
Boolean Algebra 1 – The Laws of Boolean Algebra; Author: Computer Science;https://www.youtube.com/watch?v=EPJf4owqwdA;License: Standard Youtube License