Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ prgramming help

Name: chez 2007-01-26 23:58

I made this program and it run with no errors but when I test it It gives me weird results. I am a C++ noob BTW

#include <iostream>
using namespace std;

int main()
{

int feet;
int yard;
int inche;
int centimeters;
int meter;

yard = feet*3;
inche = feet/12;
centimeters = inche*2.54;
meter = centimeters*100;

cout << "Input the number of feets wanted to be converted: \n" ;
cin >> feet;
cout << "Yard(s):     " << yard << endl;
cout << "Inche(s):    " << inche << endl;
cout << "Centimeters: " << centimeters << endl;
cout << "Meters:      " << meter << endl;



return 0;
   }

Name: Anonymous 2007-01-27 0:55

make those ints into floats

Name: Anonymous 2007-01-27 1:56

also you may want to do the conversion AFTER getting user input

Name: Anonymous 2007-01-27 2:31

ya i did it too early lol

thanx

Name: Anonymous 2007-01-27 4:55

>>4
lol what a fucking moron :D you fail, stop at once

Name: Anonymous 2007-01-28 17:21

"int main()" should be "void main()" maybe????

Name: Anonymous 2007-01-28 18:11 (sage)

>>6
hahaha oh wow

Name: Anonymous 2007-01-28 18:36

>>6

Are you always this stupid?

Name: Anonymous 2007-01-30 18:11

>>6
lern accurate ISO-C
int main(int argc, char* argv[]) for God's sake!

Name: Anonymous 2009-01-14 14:22

Can moderators ban this faggot?

Name: Anonymous 2010-12-17 1:30

Xarn is a bad boyfriend

Name: Sgt.Kabu圂ኽkiman귷 2012-05-28 22:09

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List