cube.cpp 1 #include "cube.h" 2 3 4 5 cube.h 1 2 3 4 6 7 8 9 Tester.cpp 9 10 11 12 13 14 15 16 17 1 #include 2 #include 3 using namespace std; 4 5 #include "cube.h" 6 7 8 18 19 #ifndef CUBE H #define CUBE H 20 21 // Write your functions here #endif int main() { } cout << "cube (2.5): << cube (2.5) << endl; cout << "Expected: 15.625" << endl; cout << "cube (7): " << cube (7) << endl; cout << "Expected: 343" << endl; "1 cout << "cube (9.8): << cube (9.8) << endl; cout << "Expected: 941.1920000000002" << endl; cout << "cube (5.9): " << cube (5.9) << endl; cout << "Expected: 205.37900000000002" << endl; cout << "cube (9): << cube (9) << endl; cout << "Expected: 729" << endl; "I cout << "cube (2): " << cube (2) << endl; cout << "Expected: 8" << endl;
cube.cpp 1 #include "cube.h" 2 3 4 5 cube.h 1 2 3 4 6 7 8 9 Tester.cpp 9 10 11 12 13 14 15 16 17 1 #include 2 #include 3 using namespace std; 4 5 #include "cube.h" 6 7 8 18 19 #ifndef CUBE H #define CUBE H 20 21 // Write your functions here #endif int main() { } cout << "cube (2.5): << cube (2.5) << endl; cout << "Expected: 15.625" << endl; cout << "cube (7): " << cube (7) << endl; cout << "Expected: 343" << endl; "1 cout << "cube (9.8): << cube (9.8) << endl; cout << "Expected: 941.1920000000002" << endl; cout << "cube (5.9): " << cube (5.9) << endl; cout << "Expected: 205.37900000000002" << endl; cout << "cube (9): << cube (9) << endl; cout << "Expected: 729" << endl; "I cout << "cube (2): " << cube (2) << endl; cout << "Expected: 8" << endl;
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section: Chapter Questions
Problem 3PP
Related questions
Question
Need some help writing functions for this problem.
Write a pair of functions cube which return the cube of their arguments.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
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.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr