1. ## Help me

Hi ive made a menu for conversions and im not sure how to add the conversions to my menu, i have sub menus: weight, measurement, tempereture and distance, ive done the distance sub menu but cant get my head around doing the kilometres to miles and miles to kilometres conversion, if someone could help i should be able to work the rest out, thanks

Code:
```#include <stdio.h>
#include<stdlib.h>
int distance(void);
int sw;
int main()
{
}

{
system("cls");

printf(" Please selcet a catagory !\n");
printf(" 1.Weight\n");
printf(" 2.Measurement\n");
printf(" 3.Tempereture\n");
printf(" 4.Distance \n ");
sw = getch();
sw = sw - '0';
switch (sw) {
case 1:
//weight
break;

case 2:
//measurment
break;

case 3:
//tempereture
break;

case 4:
//distance
break;

default:
break;
}
}

int distance()
{
system("cls");
printf(" 1.Mile's to kilometre's\n");
printf(" 2.Kilomere's to mile's\n");
printf(" 3.Back to the Main menu\n");
sw = getch();
sw = sw - '0';
switch (sw) {
case 1:
//miles to kilometres
break;

case 2:
//kilometres to miles
break;

case 3:
main();
break;

default:
distance();
break;
}
}```

2. that code looks suspiciously like the code from http://cboard.cprogramming.com/c-pro...y-program.html
since you are copying someone else's work, just copy from that link.

3. It is i used it to do the menu but cant figure out how to do the conversions

4. google 'miles to kilometers' etc and it will tell you what to do

5. Ive tried adding a miles to kilometres conversion but cant get it to run properly

Code:
```#include <stdio.h>#include<stdlib.h>

int distance();
int sw;
int main()
{
float value;
value=distance();
printf("%f", value);
return 0;

}

{
system("cls");

printf(" 1.Weight\n");
printf(" 2.Measurement\n");
printf(" 3.Distance\n");
printf(" 4.Tempereture \n ");
sw=getch();
sw=sw-'0';
switch(sw)
{
case 1:
//code....
break;

case 2:
//...
break;

case 3:
distance();
break;

case 4:
//...
break;

default:
break;
}
}
int distance()
{
system("cls");
printf(" 1.Miles to kilometres\n");
printf(" 2.Kilomeres to miles\n");
sw=getch();
sw=sw-'0';
switch(sw)
{
case 1:
MtoK();
break;

case 2:
//code...
break;

case 3:
main();
break;

default:
distance();
break;
}
}
int MtoK()
{
float miles, kilometres;
system("cls");
printf("\t\tMiles to Kilometres Conversion\n");
printf("\t\t------------------------------\n");
printf("\t\tEnter number of Miles: ");
kilometres=miles/0.621371192;

printf("\t\t%2.2f mile(s) == %2.2f kilometre(s)",miles, kilometres);