Solution must be in typed form C++ pls. I failed the test and at the end of the last line should be like 3359.42 which I got 3359.42
Solution must be in typed form C++ pls. I failed the test and at the end of the last line should be like 3359.42 which I got 3359.42
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Pls do fast within 5 minutes and i will give like for sure. Solution must be in typed form
C++ pls.
I failed the test and at the end of the last line should be like 3359.42 which I got 3359.42 and I have no idea why i got wrong. Help me please.
![44
45 double boxes PerTon (double tons)
46 {
47
double num-35274*tons;
num-35274/num;
return num;
48
49
50 }
51
52 void printResults (double tons, double boxes)
53 {
54
55
56}
CodeCheck
fail
10.5
Running decomposition.cpp
Test 1
Input:
cout<<"Enter ounces per box of cereal: Weight in metric tons, boxes per ton: ["
<<tons<<", "<<boxes<<"]"<<endl;
Score
Reset
0/1
Cereal Box Calculator
Cereal Box Calculator
Enter ounces per box of cereal: Weight in metric tons, boxes per ton: [0.00029767, 3359.43] Enter ounces per box of cereal: Weight in metric tons, boxes per ton: [0.00029767, 3359.4
Actual
Expected](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2c9be08c-6781-45e9-b4fe-4a21f178919a%2Fd35a3c6b-b4a3-44bf-bbce-79a83fafa20e%2Fda8bp5_processed.jpeg&w=3840&q=75)
Transcribed Image Text:44
45 double boxes PerTon (double tons)
46 {
47
double num-35274*tons;
num-35274/num;
return num;
48
49
50 }
51
52 void printResults (double tons, double boxes)
53 {
54
55
56}
CodeCheck
fail
10.5
Running decomposition.cpp
Test 1
Input:
cout<<"Enter ounces per box of cereal: Weight in metric tons, boxes per ton: ["
<<tons<<", "<<boxes<<"]"<<endl;
Score
Reset
0/1
Cereal Box Calculator
Cereal Box Calculator
Enter ounces per box of cereal: Weight in metric tons, boxes per ton: [0.00029767, 3359.43] Enter ounces per box of cereal: Weight in metric tons, boxes per ton: [0.00029767, 3359.4
Actual
Expected

Transcribed Image Text:1 #include <iostream>
2 #include <iomanip>
3 #include <string>
4 using namespace std;
5
6 // Prototypes
7 double getInput();
8 void printTitle();
9 double ouncesToTons (double ounces);
10 double boxes PerTon (double tons);
11 void printResults (double tons, double boxes);
12
13
14 int main()
15 {
16
17
18
19
20
21
22
23 }
24
printTitle();
double ouncesPerBox= getInput();
double tons
double boxes =
35
36
37 }
25 // Function definitions
26 double getInput()
27 {
28
29
30
31 }
printResults (tons, boxes);
return 0;
32
33 void printTitle()
34 {
}
ouncesToTons (ouncesPerBox);
boxes PerTon (tons);
double t=0;
cin>>t;
return t;
cout<<"Cereal Box Calculator"<<endl;
cout<<"-
38
39 double ouncesToTons (double ounces)
40
{
41
42
43
double a ounces/35274;
return a;
-"<<endl;
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 now
This is a popular solution!
Step by step
Solved in 2 steps

Recommended textbooks for you

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

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