convert.cpp 433 B

123456789101112131415161718192021
  1. // convert.cpp -- converts stone to pounds
  2. #include <iostream>
  3. int stonetolb(int); // function prototype
  4. int main()
  5. {
  6. using namespace std;
  7. int stone;
  8. cout << "Enter the weight in stone: ";
  9. cin >> stone;
  10. int pounds = stonetolb(stone);
  11. cout << stone << " stone = ";
  12. cout << pounds << " pounds." << endl;
  13. // cin.get();
  14. // cin.get();
  15. return 0;
  16. }
  17. int stonetolb(int sts)
  18. {
  19. return 14 * sts;
  20. }