Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students also viewed these Databases questions

Question

What are the purposes of promotion ?

Answered: 1 week ago