Last active
August 29, 2015 14:07
-
-
Save samrocketman/d071d38f85de1fb68f04 to your computer and use it in GitHub Desktop.
Inches to feet play
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Sam Gleske | |
* Inches to feet | |
*/ | |
#include <iostream> | |
using namespace std; | |
//global constants | |
float const INCHES_IN_FOOT = 12; | |
//function definitions | |
float calculateInchesToFeet(int inches); | |
int main(void) | |
{ | |
cout << calculateInchesToFeet(78) << endl; | |
return 0; | |
} | |
float calculateInchesToFeet(int inches) | |
{ | |
float feet; | |
feet = (float)inches / INCHES_IN_FOOT; | |
return feet; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment