Unit Transformer

Hello I found an exercice which seems important for me

Write a program that can transform from centimeters to inches to foot as follows:
At the beginning the program asks about the format of data you will enter (cm, in, or f). After that it asks you to what formats you want the program to transform the number you entered. Finally it displays the results.

Note: 1 in = 2.54 cm
1 f = 30.48 cm


What I did is the Following - i am very new to C++ i started to learn before 1 week

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
#include <conio.h>

using namespace std;

void main()
{
	int cm, in, f;
	1 in = 2.54 cm;
	1 f = 30.48 cm;
	cout << "Please enter your data:";
	cin >> cm;
	cin >> in;
	cin >> f;


}


and I stopped because i don't know how to continue.

Any help ? how to proceed ?

Thanks :)
Don't use void main, use int main instead.

You have some illegal statements (lines 9/10).

I suggest you read:
http://www.cplusplus.com/doc/tutorial/program_structure/
http://www.cplusplus.com/doc/tutorial/variables/
Topic archived. No new replies allowed.