Thanks for the replies, I got so caught up in programming I forgot the Maths and what I was doing lol.
Code:
#include <stdio.h>
int main ()
{
float amount_in_kilos, amount_in_stones, stoneq, stone, stonesa ;
int program;
printf ("Enter any number to start or 4 to quit");
scanf ("%d",&program);
while(program!=4)
{
printf (" \n Press \n 1 for Kilos-Pounds/Stone \n 2 for Pounds-Kilos \n 3 for Stone-Kilos \n 4 to Quit \n");
scanf ("%d",&program);
if (program==1){
printf (" \n Kilograms to Stones and Pounds Program \n\n Enter the amount in Kilograms");
scanf ("%f",&amount_in_kilos);
amount_in_kilos = amount_in_kilos * 2.2;
printf ("\n The amount in Pounds is %f",amount_in_kilos);
printf ("\n\n Press 1 to convert to stones");
scanf ("%f",&stoneq);
if (stoneq==1){
stone = amount_in_kilos / 14;
printf (" \n The amount in stones is %f",stone );}
getchar();
getchar();
}
else if (program==2)
{ printf (" \n Pounds to Kilograms Program \n\n Enter the amount in Pounds");
scanf ("%f",&amount_in_stones);
amount_in_stones = amount_in_stones / 2.2;
printf ("\n The amount in Kilograms is %f",amount_in_stones );
getchar();
getchar();
}
else if (program==3){
printf (" \n Stone to Kilograms Program \n\n Enter the amount in stones");
scanf ("%f", &stonesa);
stonesa = (stonesa * 14) / 2.2;
printf ("\n The amount in Kilograms is %f", stonesa);
getchar();
getchar();}
}
return 0;
}
All fixed now