Okay this is the very basis of an unfinished code that i have made after my last one had so much pointless code that it was was over 500 lines long. Anyways im making a converter that first asks u for a unit to start with.
It show with Cout << ....... that each unit is paried with a number
eg.
inches[1] miles[2]
then cin asks for a number and then it leads to a switch case with the variable that cin has just recieved.
eg.
switch(convertfromvariable){
case 1:
break;
case 2:
break;
default:
break;
default leads it to say error try again with a loop. An try again( y or n) if char loop == y then keep looping, if n terminate program.
case 1 goes to the same thiong but cin asks for a convertovarible number(again paired with a unit). Finally it leads to the final switch case
eg. feet=1
...
case 1:
cin >> yadayada
switch(to)
case 1:
cin >> for amount caleld int(inches)
result=inches/12
and then the loop would u like to try agsin.
if anyone wants to suiggest a bbetter way tell it. just dont write the whole code cause then MAKEing a program would be useless. O ya im not doing and stuff with define function and stuff. Thank you