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 1.3, Problem 4E
(a)
Program Plan Intro
To determine the number of outputs required for the given program.
(b)
Program Plan Intro
To determine the number of inputs required for given program.
(c)
Program Plan Intro
To determine the formula for converting input items into outputs items.
(d)
Program Plan Intro
To test the formula written in Exercise 4c for following data s
= 60 mph, d=12 mi/sec2and t =10 second
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
(c++)
int x = 0, y = 10, z = -5;
while ( z < x || y > x )
{
y + = z;
x -- ;
z ++;
}
x =
y =
z =
(C PROGRAMMING ONLY)
6. Deal or No Deal?by CodeChum Admin
When I was a kid, I used to watch this TV game show, Deal or No Deal? In the game, there are different brief cases, each labeled with a number. Inside each brief case is an amount in Pesos and the goal is to guess which briefcase contains the smallest amount.
In this program, instead of just finding the smallest amount, your task is to ask the user for an integer input and print the values in the array smaller than the inputted integer.
Instructions:
In the code editor, you are provided with an array with 100 elements.Your task is to ask the user for an integer input and then print all the elements in the array whose value is lesser than the inputted integer.Input
1. Inputted integer
Output
Enter value: 6132450351503022244
(c program only)
2. Jack `N Poyby CodeChum Admin
Jack `N Poy is a very common game since our childhood days. Just thinking about it makes me reminisce how I crushed my cousin in this game until he cried ?
I want to feel the glory again of being very good at something. Could you help me recreate the game?
It's really simple. In Jack `N Poy, there are two players who both select either one of the following options:
RockPaperScissors
The winner is selected depending on the following rules:
Rock beats ScissorsScissors beats PaperPaper beats RockIf both players chose the same option, then it's a tie
Instructions:
In the code editor, you are provided with an enum called option which contains three possible named values:ROCK - 'r'PAPER - 'p'SCISSORS - 's'Your task is to ask two users for there chosen options. And then based on their options, determine the winner.Input
1. Option selected by Player 1
2. Option selected by Player 2
Output
If Player 1 wins, print the message "Player 1…
Chapter 1 Solutions
C++ for Engineers and Scientists
Ch. 1.1 - (Practice) a. To convert inches (in) to feet (ft),...Ch. 1.1 - (Conversion) Blood pressure is the force of blood...Ch. 1.1 - Prob. 3ECh. 1.1 - Prob. 4ECh. 1.1 - (Practice) a. Determine the conversion factors...Ch. 1.1 - Prob. 6ECh. 1.1 - (Automotive) a. An automobile engine’s performance...Ch. 1.1 - (Chemistry) a. Determine the final units of the...Ch. 1.1 - (Oceanography) The pressure, P, exerted on an...Ch. 1.1 - (Thermodynamics) The work, W, performed by a...
Ch. 1.2 - (Practice) Convert the following numbers from...Ch. 1.2 - Prob. 2ECh. 1.2 - Prob. 3ECh. 1.2 - Prob. 4ECh. 1.2 - Prob. 5ECh. 1.2 - Prob. 6ECh. 1.2 - Prob. 7ECh. 1.3 - (Electrical eng.) You’ve been asked to write a C++...Ch. 1.3 - (Physics) You’ve been asked to write a program to...Ch. 1.3 - (Electrical eng.) You’ve been asked to write a...Ch. 1.3 - Prob. 4ECh. 1.3 - (General math) Consider the following programming...Ch. 1.3 - Prob. 6ECh. 1.3 - (Statistics) This is the formula for the standard...Ch. 1.3 - Prob. 8ECh. 1.4 - (Practice) Determine a step-by-step procedure...Ch. 1.4 - Prob. 2ECh. 1.4 - Prob. 3ECh. 1.4 - Prob. 4ECh. 1.4 - Prob. 5ECh. 1.4 - (Numerical) a. Write a set of detailed,...Ch. 1.4 - (Data processing) a. Write an algorithm to locate...Ch. 1.4 - (Data processing) Determine and write an algorithm...Ch. 1.4 - (Numerical) Determine and write an algorithm to...Ch. 1 - (Conversion) Determine which of the following...Ch. 1 - (Conversion) An object’s polar moment of inertia,...Ch. 1 - Prob. 3PPCh. 1 - Prob. 4PPCh. 1 - Prob. 5PPCh. 1 - Prob. 6PPCh. 1 - Prob. 7PPCh. 1 - Prob. 8PP
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
- (General math) The volume of oil stored in an underground 200-foot deep cylindrical tank is determined by measuring the distance from the top of the tank to the surface of the oil. Knowing this distance and the radius of the tank, the volume of oil in the tank can be determined by using this formula: volume=radius2(200distance) Using this information, write, compile, and run a C++ program that accepts the radius and distance measurements, calculates the volume of oil in the tank, and displays the two input values and the calculated volume. Verify the results of your program by doing a hand calculation using the following test data: radius=10feetanddistance=12feet.arrow_forward(General math) a. Write a C++ program to calculate and display the value of the slope of the line connecting two points with the coordinates (3,7) and (8,12). Use the fact that the slope between two points with the coordinates (x1,y1)and(x2,y2)is(y2y1)/(x2x1). b. How do you know the result your program produced is correct? c. After verifying the output your program produces, modify it to determine the slope of the line connecting the points (2,10) and (12,6). d. What do you think will happen if you use the points (2,3) and (2,4), which results in a division by zero? How do you think this situation can be handled? e. If your program doesn’t already do so, change its output to this: The value of the slope is xxx.xx The xxx.xx denotes placing the calculated value in a field wide enough for three places to the left of the decimal point and two places to the right of it.arrow_forward(C PROGRAMMING ONLY) 1. Dealing With Monthsby CodeChum Admin We're done dealing with days. It's time to step up and now deal with months! Instructions: In the code editor, you are provided with a code in the main() which has 12 printf's. Each printf prints a month with its corresponding value. For this program, January is 1, February is 2, March is 3, and so on. When you run the initial code, you will encounter errors because these month names that have been printed don't exist yet.Your task is to create an enum data type which contains these month names as values so that when we run the code, there will be no more error.Do not edit anything in the main(). Output January = 1February = 2March = 3April = 4May = 5June = 6July = 7August = 8September = 9October = 10November = 11December = 12arrow_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(Heat transfer) The energy radiated from the surface of the sun or a planet in the solar system can be calculated by using Stefan-Boltzmann's Law: E = o x T4 E is the energy radiated. o is Stefan-Boltzmann's constant (5.6697 x 10-8 watts/m2K4). Tis the surface temperature in degrees Kelvin (°K = °C + 273). a. Determine the units of E by calculating the units resulting from the right side of the formula. b. Determine the energy radiated from the sun's surface, given that the sun's average temperature is approximately 6000°K.arrow_forwarduse python codearrow_forward
- (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(python) Find at least 12 issues in the code. A = int(input("Enter a number for A: ")) B = str(input("Enter a number for B: ")) C = int(input("Enter a number for C: ")) #Check that user input for A is not 0. if A = 0: print("Your coefficient for 'A' MUST BE a value greater than 0, otherwise your equation is not a quadratic!") int(input(Please enter a new value for a:")) = A import math: //Compute the discriminant. disc = (B*B) - (4*A*C) #Display the disciminant computed. print("\nThe discriminant of your equation is", str(disc) + ".") #Check the sign of the computed discriminant if disc == 0: print("This equation has 1 real solution.") x = (-B + math.sqrt(disc)) / (2 * A) print("The solution to your equation is:", x) elif disc > 0 print("This equation has 2 real solutions.") x1 == (-B + math.sqrt(disc)) / (2 * A) x2 == (-B - math.sqrt(disc)) / (2 * A) print("One solution to your equation is:", x1) print("The other solution to your equation…arrow_forward(C PROGRAMMING ONLY!) Your task is to fill in the blank with the correct condition. 5. Finding the Impostorby CodeChum Admin There's this Dog game I played where a group of Dogs gather together and complete missions. One of them though is an impostor because it is not a real dog; its breed is not a dog breed. Your task is to find that impostor. To do this, you need to check Instructions: In the code editor, you are provided with the enum, DogBreed. Furthermore, an initial main() code is provided for you where the user is asked for what the breed of the Dog.Then, in lines 18 - 22, a partial code to check if the breed is valid or not is given.Your task is to fill in the blank with the correct condition. Make sure to use the values of the enum, DogBreed in checking. Input 1. Dog Breed Output Input the breed of the dog: 2Yup, the breed is validarrow_forward
- (Don't copy) Write C++ program to find as many prime Fibonacci numbers as you can. It is unknown whether there are infinitely many of these. Find out the times taken to find first 10, 20, 30, 40…up to 200 and draw a graph and see the pattern.arrow_forward( C PROGRAMMING ONLY) 2. Solving a Person's Lonelinessby CodeChum Admin It's been 1,245 years and our sole Person is getting lonelier each day. This Person definitely needs a partner! Thus, we need to update our Person's design to have a gender as well and there shall be male and female! Instructions: In the code editor, you are provided with the definition of a struct Person. This struct needs an integer value for its age. Furthermore, you are provided with a displayPerson() function which accepts a struct Person as its parameter.Your task is to first update the struct Person so that it can have a gender as well. For this program, we shall represent a gender with a single character: 'M' for male and 'F' for female.Then, create a Person, take in an integer user input and a character user input, and then set them as the Person's age and gender respectively.Finally, call the displayPerson() function and pass that Person you created.Input 1. The age of the Person 2. The gender of…arrow_forward1. (Floating-Point Arithmetic). For each of the following numbers,(a) determine whether the number is a 4-digit oating-point number (the number of the FPA4);(b) if yes, write the number in the standard form ±0.d1d2d3d4 × 10n, where d1 is a nonzero digit and n ∈ Z;(c) if no, rst chop and then round the number to a number of the FPA4, written in the standard form:(i) − 0.989067000000001; (ii) − 51.8; (iii) − 900.377050000001; (iv) − 5000.0;(v) − 0.023409; (vi) 2036.0; (vii) 0.01814.arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
What Are Data Types?; Author: Jabrils;https://www.youtube.com/watch?v=A37-3lflh8I;License: Standard YouTube License, CC-BY
Data Types; Author: CS50;https://www.youtube.com/watch?v=Fc9htmvVZ9U;License: Standard Youtube License