You are on page 1of 1

3p7

#include <iostream>
#include <iomanip>
using namespace std;
int main ()
{
double mass , densty , volume ;
cout << "Enter mass in grams " << endl;
cin >> mass ;
cout << "Enter densty in grams per cubic centimete " << endl;
cin >> densty ;
volume = mass / densty ;
cout << fixed << showpoint << setprecision(2) ;
cout << " Volume = " << volume << " centimeter cube "<< endl ;
return 0;
}

You might also like