This is what I'm trying to do:
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int membername, oweight, lostw, percentlost;
double totalwt;
cout << "What is the member's name? ";
cin >> membername;
cout << "How much did you weight?\n ";
cin >> oweight;
cout <<"How many pounds have you lost?\n";
cin >> lostw;
percentlost = (lostw / oweight) * 100;
totalwt = oweight - lostw;
cout << "The member " << membername << " has lost " << percentlost<< "% of weight and now weight " << totalwt << "pounds";
return 0;
}
I'm able to enter the member's name, but that is it.
Please help.
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
int membername, oweight, lostw, percentlost;
double totalwt;
cout << "What is the member's name? ";
cin >> membername;
cout << "How much did you weight?\n ";
cin >> oweight;
cout <<"How many pounds have you lost?\n";
cin >> lostw;
percentlost = (lostw / oweight) * 100;
totalwt = oweight - lostw;
cout << "The member " << membername << " has lost " << percentlost<< "% of weight and now weight " << totalwt << "pounds";
return 0;
}
I'm able to enter the member's name, but that is it.
Please help.
Comment