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...
icon
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
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
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;
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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
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 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)
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
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY