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
Get step-by-step solutions from verified subject matter experts
