C++ Help

Good Day All,

I am new to programming as a whole so bear with me. Here is my problem I am to complete for school. I have tried different coding and failed miserably, so I am wanting to start from the beginning.

"Write a program that prompts the user to enter the weight of a person in kilograms and outputs the equivalent weight in pounds. Output both the weights rounded to two decimal places. (Note that 1 kilogram = 2.2 pounds.) Format your output with two decimal places."

Any assistance will be very helpful.

Thanks,
Jason
Show us what you have so far so that we can see where it is you need help. Make sure you use the code tags.
#include<iostream>
int main()
{
double weight;
double weightInPounds;
cout<<"Enter Weight of person in kilograms\n";
cin>>weight;

weightInPounds = weight * 2.2;

cout<<"Your weight in Pounds is : "<<weightInPounds<<endl;
return 0;
}



I just don't see what I am doing wrong.
Have you tried the cpp tutorial.

What are you using

You cannot just use cin, cout, ...
Last edited on
Topic archived. No new replies allowed.