fork download
  1. //Ivy Whitney CSC 5 Chapter 2, P.83 #12
  2.  
  3. /**************************************************************
  4.  *
  5.  * Display Land Calculation
  6.  * ____________________________________________________________
  7.  * This program determines the amount of acres a plot of land is.
  8.  * ____________________________________________________________
  9.  * INPUT
  10.  *
  11.  * landTotal = Total amount of land
  12.  * acreSize = size of acre
  13.  *
  14.  * OUTPUT
  15.  *
  16.  * acreTotal = amount of acres in the land provided
  17.  *
  18.  **************************************************************/
  19.  
  20.  
  21. #include <iostream>
  22. using namespace std;
  23.  
  24. int main()
  25.  
  26. {
  27.  
  28.  
  29. float landTotal;
  30. float acreSize;
  31. float acreTotal;
  32.  
  33. //Variables
  34.  
  35. landTotal = 43,560;
  36. acreSize = 389,767;
  37.  
  38. //Computation
  39.  
  40. acreTotal = acreSize / landTotal;
  41.  
  42. //Output
  43.  
  44. cout << "The total amount of acres is " << acreTotal;
  45. return 0;
  46. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
The total amount of acres is 9.04651