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-28 17:21

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

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