C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 1.4, Problem 5E
Program Plan Intro
To write the step-by-step instructions to find the smallest number in a group of three integer numbers.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
(C PROGRAMMING ONLY)
1. Pointing Fingersby CodeChum Admin
I am so mad at my brothers, they always point their fingers to me whenever mom gets angry ?
Now that I'm knowledgeable about pointers, I'm going to point all of my 5 fingers to them. Let's see who's tough now!
Instructions:
In the code editor, you are provided with a main() function where the user is asked for 5 double numbers.Then, in lines 19 - 23, your task is to set the addresses of these numbers to each of the pointers. The address of the first number, a, should be assigned to the first pointer, the address of the second number, b, should be assigned to the second pointer, and so on.Input
1. First number
2. Second number
3. Third number
4. Fourth number
5. Fifth number
Output
Enter 1st number: 23.2Enter 2nd number: 10.01Enter 3rd number: 800Enter4th number: 24Enter 5th number: 2123.2 10.0 800.0 24.0 21.0
(Product of a series) Write a program to calculate the product of the following series:
1
...
13
21
25
93
97
-Program C
5. Even Out
by CodeChum Admin
You know, I was lying when I said the last time that numbers associated with 3 are my favorite, because the one I actually like the most in the world are even numbers! But to make things harder for you, you have to pick the even numbers from a range of two given numbers. Ha!
Now, let's try this one more time!
Instructions:
Input two integers in one line, separated by a space. The first integer shall represent the starting point, and the other, the ending point.
Print out all even numbers that are within the range of the starting and ending point (inclusive or including the ending point).
Input
1. The starting point
2. The ending point
Output
The first line will contain a message prompt to input the starting point. The second line will contain a message prompt to input the ending point. The last line contains the integers within the range.
Enter·the·starting·point:·5
Enter·the·ending·point:·10
6·8·10
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
- (C PROGRAMMING ONLY) 1. Point Me Thereby CodeChum Admin I was supposed to be your tour guide but I don’t know where our destination is. I have a list here that contains all the destinations where we are going to go. Each destination is basically represented with an integer. But it seems that I'm confused. Please help me by pointing me to the correct address. Instructions: In the code editor, you are provided with a main() code that asks for an integer input from the user and stores this to the variable n.Your task is to set the value of the destination_ptr found at line 9 to the address of the variable n.Aside from this, do not edit anything else.Input 1. An integer value Output Enter the destination number: 2Found it!arrow_forward( C PROGRAMMING ONLY) 5. Simplicity is Beautyby CodeChum Admin In life, simplicity is beauty. Let's try creating something so simple. Let's create a function that accepts the address of an integer and prints n number of asterisks out of it. For example, if the value of the address passed is 5, then the output would be five asterisks in one line. Instructions: In the code editor, you are provided with a main() function that asks the user for an integer and passes the address of this integer to a function call of the simple() function.This simple() function hasn't been implemented yet so your task is just that, to implement it. This has the following description:Return type - voidName - simpleParameter - address of an integerDescription - prints a line of asterisksDO NOT EDIT THE MAIN FUNCTIONInput 1. An integer Output Enter·n:·5*****arrow_forwardIntroduction to Python Chapter 5.2 question Python coding, please. (Repeat additions) Listing 5.4,5.4, SubtractionQuizLoop.py, generates five random subtraction questions. Revise the program to generate ten random addition questions for two integers between 1 and 15. Display the correct count and test time.arrow_forward
- (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 7arrow_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(python) 5. Write the python code to create a list of 10 different random numbers.arrow_forward
- (MIPS/MARS programming) Write a Program that initialize 4 by 4 Table and find the Maximum number in the table and prints the value, the row number and the column number of that maximum number.arrow_forwardrefer to the photos below for the instruction and sample output program. (the program is a C Language)arrow_forwarddont use aia)A benchmark program takes 80 seconds to finish on a machine, with floating point arithmetic representing 70% of the time. The hardware engineering team plans to optimize floating point arithmetic of the machine by a factor of 3. What is the expected overall improvement of speed? (b) It turns out that the hardware team is only able to optimize the floating-point arithmetic by a factor of 2. To remedy the shortfall, the software team now wants to adjust the proportion of floating-point arithmetic in the program so as to still achieve the performance improvement claimed in (a) above. What is the needed final proportion of floating-point arithmetic in the benchmark program?arrow_forward
- Outline a method to compute the 2's complement of a number. Problem 3: m Write a program in SimpleRisc assembly to find the smallest number that is a sum of two different pairs of cubes. [Note: 1729 is the Hardy-Ramanujan number. 1729 = 12% + 1% = 10° + 9°)arrow_forward(java) Using the push and pop stack operations, write a program to convert from an infix expression to a postfix expressionarrow_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
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
Computer Fundamentals - Basics for Beginners; Author: Geek's Lesson;https://www.youtube.com/watch?v=eEo_aacpwCw;License: Standard YouTube License, CC-BY