what am i doing wrong???

It's a simple program but what am I doing wrong here?

#include <iostream>
using namespace std;

int main()
{
double pounds, kilograms;

cout<<"please enter your weight"<<'\n';

// this is where the problem is (the cin line)
cin>> pounds >>'\n';
kilograms =pounds/2.2;
cout<<"your weight in kilos is:"<<'\n';
cout<<kilograms<<"kilos"<<'\n';
return 0;
}

what is going on here???
You should remove >> '\n'; from that line.
here is the second and I'm having the same problem with my cin statement

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
double volume, radius, height;

cout<<"how tall is the tank?"<<;
cin<<height;
cout"what is the radius?"<<;
cin<<radius;
volume =3.14159*pow(radius,2.0)*height;
cout<<"the volume of the cylinder is:"<<volume<<'\n';
return 0;

}
1
2
3
cout<<"how tall is the tank?"<<; // add something after << or remove it
cin<<height; // "<<" should be ">>"
cout/*missing << */"what is the radius?"<<; // same errors from here to the next lines... 


Please use [code][/code] tags
Topic archived. No new replies allowed.