Try to compile...nothing happens
Code:
/*******************************************************************************
* Name: tripAdvanced.c
* Assignment: LAB 2
* Date Written: 10/11/2007
* Course: CS133
* Purpose: Calculate more usefull info for a car trip
* Sources:
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("Welcome to the Trip Planner!\n"
"So you are ready to take a trip? Let me help you plan for\n"
"your fuels costs and required stops to fill up your tank.\n"
"===========================================================================\n"
"Please provide answers to the prompts below and I will\n"
"display a summary for you when I have computed the results.\n"
"===========================================================================\n"
"\n");
float MPG, Lcost, Hcost, miles, gallons, LTcost, HTcost;
printf("Please input your car's average miles per gallon >> ");
scanf("%f", &MPG);
printf("Please tell me the range of fuel costs you expect to pay (per gallon)."
"The lowest per gallon cost of fuel is >> ");
scanf("%f", Lcost);
printf("The highest per gallon cost of fuel is >> ");
scanf("%f", Hcost);
printf("Please tell me how many miles you plan to travel >> ");
scanf("%f", miles);
gallons= miles / MPG;
LTcost= gallons * Lcost;
HTcost= gallons * Hcost;
printf("\n"
"=============== Trip Summary =================="
"\n");
printf("You will need to purchase %.2f gallons of fuel.\n" , gallons);
printf("The approximate cost of fuel for your trip is between $%.2f and $%.2f.\n" , LTcost, HTcost);
system("pause");
return 0;
}
That is the code I'm trying to compile. The thing is, I know that my compiler (bloodshed) works fine, as I've written several programs though it. But when I try and compile it, the only thing that comes up is "Press any key to continue..."
I don't get any errors on it either. So then, why wouldn't show IF ANYTHING, my 1st printf?
Thanks in advanced,
Kevin