This program converts furlongs into yards. 1 furlong = 220 yards
You run the program, and it asks you to enter a distance in furlongs. You enter a number, press enter and it spits out the equivelent distance in yards.
The conversion I use in the funtion is 220 * sts
Say I input "9" furlongs, for the program to convert into yards...
It will spit out the number 1980..
But if I input the number 9.5 it still spits out 1980. It should spit out 2090........I would like the program to be able to output the correct value...any advice is appreciated..
Here is the code:
#include <iostream>
using namespace std;
double TEST(double);
int main()
{
cout << "State a distance in furlongs:";
int variable;
cin >> variable;
int bus;
bus = TEST(variable);
cout << "The equivelent distance in yards is: " << bus;