Question: 1. Create 2 text files. DataIn.txt DataOut.txt Write a program that accepts as input (from DataIn.txt) the mass, in grams, and density, in grams per

1. Create 2 text files.

DataIn.txt

DataOut.txt

Write a program that accepts as input (from DataIn.txt) the mass, in grams, and density, in grams per cubic centimeters, and calculates the volume of the object using the formula: volume = mass/density.

Format your output to two decimal places.

Output the result to both the console and the DataOut.txt file.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!