Answered step by step
Verified Expert Solution
Question
1 Approved Answer
2. Develop a simple C++ application using Makefile. 1. Write a program named calculate.cpp that contains the following functions: double subtract ( double x, double
2. Develop a simple C++ application using Makefile. 1. Write a program named calculate.cpp that contains the following functions: double subtract ( double x, double y ); double divide ( double x, double y ); which perform the arithmetic operations subtract and divide and return the results. 4. Put the function prototypes in a header file name calculate .h and include it in other .cpp programs. 5. Compile your program using the command $ g++ -c calculate.cpp. 6. Write an program named main.cpp that asks fordouble inputs to test your arithmetic functions. 7. Compilte main.cpp using $ g++ -c main.cpp. 8. Link your programs: $ g++ -o calculate main.o calculate.o. 9. Test your program by executing $ /calculate. TUN you POBU UY URUutis V LUILDIUil. 3. Write a Makefile that compiles and links your programs. See video Basic Makefile and Program Development. In your report, show your programs, the Makefile, and the scripts that you have successfully created the object files and executable and run it with correct output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started