I wrote the following program (it works), but it only displays theresults in a w
ID: 3612753 • Letter: I
Question
I wrote the following program (it works), but it only displays theresults in a whole number. How would I tell it to display theanswer to include two decimals?// fahren.cpp
// demonstrates cin, newline
#include <iostream>
using namespace std;
int main()
{
int length; //for temperature in fahrenheit
cout << "Enter length in feet: ";
cin >> length;
int width; //for temperature in fahrenheit
cout << "Enter width in feet: ";
cin >> width;
int area = (length * width) / (640 * 640);
cout << "Equivalent in Square Acres is: "<< area << ' ';
system("pause");
return 0;
}
Thanks!!!