Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
C++ OOP Write a
The program should then convert the length to inches (to the nearest inch) and
output the length expressed in yards, feet, and inches, in that order. For example,
suppose the input for centimeters is 312. To the nearest inch, 312 centimeters is
equal to 123 inches. 123 inches would thus be output as:
3 yard(s), 1 feet (foot), and 3 inch(es).
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images
Knowledge Booster
Similar questions
- C++ CODE ONLY: Write a program that takes as input five numbers and outputs the mean (average) and standard deviation of the numbers. If the numbers are X₁, X2, X3, X4, and x5, then the mean is X = (X1 + X2 + X3 + x4 + x5 ) / 5 and the standard deviation is: (x₁−x)²+ (x₂-x)²+ (x¸¯x)²+(x¸−x)²+(x¸¯x)² S = 5 Your program must contain at least the following functions: 1. a function that calculates and returns the mean; and, 2. a function that calculates the print standard deviation. Input 1.5 integers Output Enter five numbers: 2 3 9 10 11 The mean is 7.00. The standard deviation is 3.742. Enter five numbers: 7 7 8 9 11 The mean is 8.40. The standard deviation is 1.497.arrow_forwardC++ program Vs Coding please!! General Crates, Inc. builds custom-designed wooden crates. With materials and labor, it costs GCI $0.23 per cubic foot to build a crate. In turn, they charge their customers $0.50 per cubic foot for the crate. You have been asked to write a program that calculates the volume (in cubic feet), cost, customer price, and profit of any crate GCI builds. Once calculated, display the volume, cost, customer price, and profit to the user.arrow_forwardC Program In order to discourage excess electric consumption, an electrical company charges its customers a lower rate of P75 for the first 250 kilowatt-hours and a higher rate of P8.5 for each additional kilowatt-hour. In addition, a 10% surtax is added to the final bill. Write a program that calculates the electrical bill given the number of kilowatt-hours consumed as input. At the end, print the number of kilowatt-hours consumed and the computed bill.arrow_forward
- Write a C++ program: Blood sugar is considered normal if its rate is less than 140 and greater than 70 , it is considered high its rate is greater than or equal to 140 , and it is considered low its rate is less than or equal to 70 . Write a C ++ program that asks the user to input the rate of blood sugar of each patient in a hospital ( -1 to indicate the end of the data . ) The program should calculate and print the flowing : • The number of patients with normal blood sugar . • The number of patients with high blood sugar . • The number of patients with low blood sugar . • The total number of patients entered by the userarrow_forwardC PROGRAM Any customer whose total PURCHASE is at least P1000 will be given a 10% discount. Make a program that would input the customer’s PURCHASE and output his net BILL.arrow_forwardusing c++arrow_forward
- C++ program Vs Coding please!! General Crates, Inc. builds custom-designed wooden crates. With materials and labor, it costs GCI $0.23 per cubic foot to build a crate. In turn, they charge their customers $0.50 per cubic foot for the crate. You have been asked to write a program that calculates the volume (in cubic feet), cost, customer price, and profit of any crate GCI builds. Once calculated, display the volume, cost, customer price, and profit to the user. You will provide two tables as output for this program. The first table will echo length, width, and height, and will also show the volume. The values are to have three digits after the decimal, and be lined up by the decimal point in their table. The second table will show the money - our cost, our selling price, and our profit. These values are also aligned by the decimal point, and will have two digits after the decimal point (as is customary for currency). Submit your source code and a screen shot in which you run your…arrow_forwardC++ Programarrow_forwardWrite a program in c++ to generate a random number between 1 - 100, and then display which quartile the number falls in. First quartile is 1 - 25 Second quartile is 26 - 50 Third quartile is 51 - 75 Fourth quartile is 76 - 100 The following program shows how to get a random integer between 1 - 100. Use the code as an example for your own program. SAMPLE PROGRAM// This program displays a random number between 1 - 100#include <iostream> // for input and output#include <cstdlib> // for rand() and srand()#include <ctime> // for time()using namespace std;int main(){ //constantsconst int MIN_VALUE = 1;const int MAX_VALUE = 100;//get system time and seed random number generatorunsigned seed = time(0);srand(seed);//get random number between 1 - 100int num = (rand() % (MAX_VALUE - MIN_VALUE + 1)) + MIN_VALUE;cout << num << endl;return 0;} Your program should: contain header comments as shown in class display a "hello" message generate a random number…arrow_forward
- helpme solve it in C++arrow_forwardUsing C++ program Write a. pseudocode for the real percentage-to-numerical-grade-equivalent displaying. Only one percentage score can be entered at a time. The grading scale is as follows: Grading Scale: Numerical Percentage value 5.00 – 0 to 59.%; 3.00 – 60 to 64.4; 2.75 - 64.5 to 68.9%3; 2.50 – 69 to 73.4%3B 2.25 - 73.5 to 77.9; 2.00 – 78 to 82.4%3; 1.75 - 82.5 to 86.9%3; 1.50 – 87 to 91.4%3; 1.25 - 91.5 to 95.9; 1.00 – 96 to 100arrow_forwardCreate a c++ program that asks the user to enter all of his 3 quizzes during the preliminary coverage. The program would then compute the average of these 3 quizzes. Afterwards, the program would ask the user again to enter 3 quizzes for his/her midterm coverage. The program again would compute the average for the quizzes for the midterm coverage. Use the math function max() to find out which of the two average grades are highest. Example: Please enter 1st prelim quiz: ____ Please enter 2nd prelim quiz: ___ Please enter 3rd prelim quiz: ___ Please enter 1st midterm quiz: ____ Please enter 2nd midterm quiz: ____ Please enter 3rd midterm quiz: ____ The average of your quizzes in prelims and midterms are: 93 for prelims and 97 for midterms. 97arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
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