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.3, Problem 4E
Program Plan Intro
Variables used-
num − to store the number
a − to store the fourth root of number
Program Description:
The main purpose of the program is to determine the fourth root of number by using sqrt() function.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
(C PROGRAMMING ONLY)
2. Weird Treasure Chestby CodeChum Admin
I'm now in the middle of the jungle when I saw this weird treasure chest.
It seems that if I properly place the address of a certain number, I get a very weird result!
Instructions:
In the code editor, you are provided with a treasureChestMagic() function which has the following description:Return type - voidName - treasureChestMagicParameters - an address of an integerDescription - updates the value of a certain integer randomlyYou do not have to worry about how the treasureChestMagic() function works. All you have to do is ask the user for an integer and then call the treasureChestMagic() function, passing the address of that integer you just asked.Finally, print the updated value of the integer inputted by the user.Input
1. An integer
Output
Enter n: 10Treasure Chest Magic Result = 13
(Valid Password) You are required to test the validity of a password by writing the following 4 C++ functions:
a.
A function called passSize that receives a string and returns true if the string has 8 or more characters.
b.
HA function called passSpace that receives a string and returns false if the string has space.
A function called passSymbol that receives a string and returns true if the string has at least one
symbol (consider a symbol as a character that is neither a letter nor a digit).
C.
d.
A function called passUpper that receives a string and returns true if the string has at least one
uppercase letter.
(Create a C++ project) Create a program to sort English alphabets using Insertion Sort by using together with class 1. Create a function for randomly generating 48 English alphabets 2. Sort the letters obtained by using Insertion Sort 3. .Set the timer to sort the letters
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
Similar questions
- (C++) Question: Write a function string middle(string str)that returns a string containing the middle character in str if the length of str is odd, or the two middle characters if the length is even. For example, middle("middle") returns "dd". I'm not getting the correct output. What am I doing incorrectly?arrow_forward(C++) Write a program that captures input from the user and swaps the letters two at a time in the string. The first two characters change places, the third and fourth characters change places, etc. Assume that the program will only take an even number of characters, otherwise, there will be an error. For example: Home will output ohem, ocidgn will output codingarrow_forward(Use Python) The function course_average should calculate and return the average of the three values pass to it. The function main should ask the user to enter three grades and then pass these values to the course_average function. This function should also display a message to the user in the format below. For example, if the user entered 100, 90 and 95 the message would be:The average of 100 , 90 and 95 is 95arrow_forward
- (use Python)Define a function called running_total that repeatedly asks the user to input integers at the keyboard until they type the word done. Return the sum of the values they entered. You may assume the user will only enter integers or "done". Include a docstring! For example: Test Input Result print(running_total()) 35done 8arrow_forward(C PROGRAMMING ONLY) 6. Before and Afterby CodeChum Admin The only constant thing in the world is change. That’s why we need to call the toupper() function to change what we already have into a better version. Instructions: Your task is to ask the user for a character input.Then, include the ctype.h built-in library and call the toupper() function. In case you do not know what this function is, this function has the following definition:Return type - intName - toupperParameter - one integer which represents the ASCII of a characterDescription - returns the ASCII of the uppercase equivalent of the character passedExtra note - even though it's function definition in the C Programming Language Documentation is int toupper(int ch), you can just pass a normal char variable instead and this will just be automatically typecasted/converted to its integer equivalent.Once you get the uppercase equivalent, print this out.Input 1. Letter to be updated Output Enter a small letter: aUppercase = Aarrow_forward(C++ Programming) Question 1: Write a program which the user is asked to enter two integers. Then, the sum of these two integers and displayedon the screen. Question 2: Design a program using “For Loop” that will output the “seven” times table as follow:7 x 1 = 77 x 2 = 147 x 3 = 21:7 x 10 = 70arrow_forward
- (Ungraded) C Language - Write a program that takes in a year and determines whether that year is a leap year.arrow_forward(C PROGRAMMING ONLY) 7. Comparing Charactersby CodeChum Admin Most, if not all things have numeric values. That goes for characters too. In order to find out which character has a higher value, we have to compare them with each other and display the value of the higher character. Instructions: In the code editor, you are provided with a main() function that asks the user for 2 characters, passes these characters to a function call of the getHigherValue() function, and then prints out the ASCII value of the higher character.Your task is to implement the getHigherValue function which has the following details:Return type - intName - getHigherValueParameters - 2 characters to be comparedDescription - the ASCII value of the higher character.Hint: Comparing characters in C is just like comparing integers.DO NOT EDIT ANYTHING IN THE MAINInput 1. First character 2. Second character Output Enter first character: aEnter second character: hResult value = 104arrow_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 C. Thank you. (Display four patterns using loops) Use nested loops that display the following patterns in four separate programs:arrow_forward
- (C++)Write a program that will allow a student to compute for his equivalent semestral grade. The program should ask the user should input his/her first name, last name, middle initial, and student number. After, inputting everything above, the output will clear the current screen and a new screen should open. A sample program that would clear a screen is included below for your reference. On the new screen, the user will then be greeted "Welcome, <firstname>! (i.e. Welcome, Louie!)" The program will then ask for the prelim grade, midterm grade and final grade of the student. The program should only accept grades 100 and below. After getting the three grades, the program should compute for the semestral grade. The computation of the semestral grade is as follows: 30%*PrelimGrade + 30%*midtermgrade + 40%finalgrade After inputting all the grades, the screen should clear again and will proceed to another screen. The new screen should output should output the following (this is…arrow_forward(Use Python)Use the Design Recipe to write a function count_vowels, which consumes a string and returns the number of vowels in that string. For these purposes, the vowels are a, e, i, o, and u, but never y. Include a Docstring! Note: Count both upper and lowercase vowels! Write 3 assert_equal statements to test your function.arrow_forward(C++ OOP) We have a house with 3 rooms.We need the user to enter 1 integer as the window number, 2 doubles as depth and width of the room, 1 double as the useless area, 1 boolean as the door's opening direction (e.g. 0 is outward).Program will compute and print the air condition as a string and the total useful area of the house as a double. Calculating the air condition: Name it air_c. Divide the useful area by the window number. If air_c >20, output "bad". If air_c <11 output "good". If 11<=air_c<=20, output "ideal". Attention: If the window number is 0, air condition is bad. Calculating the useful area of room: Width*Depth-(useless area)if the door is inward;Width*Depth-(useless area)-0.8The worst air condition of the 3 is the final air condition of house. --- 1)The information about the home must be all private within a class.2)The class must get these inputs within constructor func.3)Calculating the useful area of a room must be done within a function of a class.4)Air…arrow_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