22 lines
454 B
C++
22 lines
454 B
C++
|
// convert.cpp -- converts stone to pounds
|
||
|
#include <iostream>
|
||
|
int stonetolb(int); // function prototype
|
||
|
int main()
|
||
|
{
|
||
|
using namespace std;
|
||
|
int stone;
|
||
|
cout << "Enter the weight in stone: ";
|
||
|
cin >> stone;
|
||
|
int pounds = stonetolb(stone);
|
||
|
cout << stone << " stone = ";
|
||
|
cout << pounds << " pounds." << endl;
|
||
|
// cin.get();
|
||
|
// cin.get();
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
int stonetolb(int sts)
|
||
|
{
|
||
|
return 14 * sts;
|
||
|
}
|