Simple Yard to Feet Conversion

Published on: June 2, 2010

Learn to write a program that simply converts Yards into Feet in C++. This is great practice as it shows you how basic equations work as well as the functions of Cout's, Cin's, as well as system("pause"). Use this tutorial to teach yourself how to create your own conversion programs in C++. Enjoy the video!

Remember to checkout the Codesnip below to review the C++ code yourself! Feel free to copy the code, but I ask that you please provide credit if you leave the code unchanged when you use it.


//Programmer: Nazmus
//Program:  Yard to Feet conversion

#include <iostream>;
using namespace std;

void main()

 int yard, feet;

 cout << "Please input number of yards: ";
 cin >> yard;

 feet = yard * 3;

 cout << yard << " yards equal to " << feet << " feet." << endl;