Good day to all, I am attempting to construct a program that will accept input of lbs or stones in ordered to calculate the end reuslt and display that result. New C++ Child and attempting to find my way. Confusion is still pretty high.Here is the code I ahve written so far and at present i am stuck without completion. Any suggestions of guidance is muchly apperciated.
:#include <iostream>
using namespace std;
int main() //start of main function
{
float s; // input: number of stones
float lbs; // output: in pounds
int (sOrLbs);
// get stones or pounds
cout << " Enter the number of stones by entering s or enter lbs if weight in pounds: ";
switch (sOrLbs)
{
case 'S': case 's':
cout << "Enter the number of stones" << endl;
cin >> s;
break;
case 'P': case 'p':
cout << "Enter the weight in lbs" << endl;
cin >> lbs;
break;
}
// calculate lbs = Weight in stones * pounds
lbs = s * 14;
s = lbs / 14;