fork download
  1. //Castulo Jason Quintero CSC5 Chapter 2, P. 83, #12
  2. //
  3. /**************************************************************
  4.  *
  5.  * COMPUTE LAND ACRES
  6.  * ____________________________________________________________
  7.  * This program will compute sqaure feet to acres.
  8.  *
  9.  * Computation is based on the formula:
  10.  * Acres = square feet / acre in square feet
  11.  * ____________________________________________________________
  12.  * INPUT
  13.  * totalSquareFeet = Total amount of square feet
  14.  * acreinSqaureFeet = acre in square feet metric
  15.  *
  16.  * OUTPUT
  17.  * totalArces : How many acres were in the square feet.
  18.  *
  19.  **************************************************************/
  20. #include <iostream>
  21. #include <iomanip>
  22. using namespace std;
  23. int main ()
  24. {
  25. float totalSquareFeet; //INPUT - Total amount of square feet
  26. float acreinSqaureFeet; //INPUT - Acre in square feet metric
  27. float totalArces; //OUTPUT - How many acres were in the square feet
  28. //
  29. // Initialize Program Variables
  30. acreinSqaureFeet = 43560.0;
  31. totalSquareFeet = 389767.0;
  32. //
  33. // Compute MPG Traveled Highway
  34. totalArces = totalSquareFeet / acreinSqaureFeet;
  35. //
  36. // Output Result
  37. cout << "The total amount of arces is " << totalArces << "." << endl;
  38. return 0;
  39. }
Success #stdin #stdout 0.01s 5296KB
stdin
Standard input is empty
stdout
The total amount of arces is 8.94782.