I just made this C program in Codewarrior for mac using the "PPC console C App:"
printf("What is your fuel flow in pounds? ");
printf("What is your total fuel availible in pounds? ");
printf("What is your true airspeed in knots? ");
printf("\nEndurance: %.2f hrs\n",total_fuel/fuel_flow);
printf("Range: %.1f nm\n",total_fuel/fuel_flow*TAS);
printf("\nCalculate again? y/n ");
Here is my problem. The first run of the program is good. After the program asks "Calculate Again?" , i type in "y" and then on the next line it prints the first two printfs; printf("What is your fuel flow in pounds? "); and printf("What is your total fuel availible in pounds? "); on the same line and everything gets messed up after that until i re run the program. Could there be something wrong in my while loop? It would be great if anyone can help. thank you.