Question: Pls use c++ beginner code Write a C++ program to evaluate the following function 1.5x (x) 2.35e End Where fx) is the temperature of a
Write a C++ program to evaluate the following function 1.5x (x) 2.35e End Where fx) is the temperature of a rectangular copper plate in degree Celsius. Thex and y represent the location on the copper plate in inches. Here is what needs to be included: 1. Create a file containing the x and y values, the location coordinates. You may call this file anything you like (eg. temperature.txt) 2. Write a C++ program that opens the data file, containing the x and y values, within the main function and reads the x and y values. The temperature value is then computed. Use the ifstream to access the file. Create a function where the actual calculation to be done and pass the x and y values to this function from the main. This will be a pass-by-value procedure. The calculated temperature will be returned to the main function (or passed by reference, if you like). Note that you need to call this function once the first set of x and y values are read. The read and the function call must be in a loop so that you can repeat reading and calculation. Print x, y, and temperature values from the main function with appropriate headings on the screen. Print the same information into an output data file called myoutput.txt 3. 4. 5. using the ofstream. Table 1. Coordinates Information X (in.) Y (in.) 0 0.2 0.4 0.6 0.8 1.0 0.3 0.5 0.7 0.9
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
