Sunday, 7 February 2016

Write a C++ program that asks for a distance in furlongs and converts it to yards.(One furlong is 220 yards.)

Leave a Comment
Questions:

Write a C++ program that asks for a distance in furlongs and converts it to yards.(One furlong is 220 yards.)

Explanation:

This problem is simple and just demonstration of basic input and output streams.  Below mention code is compiled in Visual Studio 2015 and output snap is attached.. If any problem you feel and want explanation feel free to contact.

Code:

/**************************************************|
/*************C++ Programs And Projects************|
***************************************************/


#include<iostream>
using namespace std;

void main() {
       int furlongs, yards = 0;;

       cout << "Enter distance in furlongs (US) = ";
       cin >> furlongs;
       yards = furlongs * 220;
       cout << "Total yards = " << yards << endl;
}


Output:



Related Articles:

C++ Books Solution

If You Enjoyed This, Take 5 Seconds To Share It

0 Questions: