PostChache
November 20th, 2009, 09:01 PM
For some reason gcc test.c -o 123 isn't making an executable file. It'll compile it but I can't do ./123 This use to work and I don't know what happened. Any ideas?
Okay actually for some reason whenever I compile this program it doesn't make an executable file so I don't know what's wrong with it because it was working last night.
This is the code that I'm trying to compile
#include <stdio.h>
const double k_ftc = (1.8 * n) + 32; //Fahrenheit to Celsius
const double k_ctk = 273.16; //Celsius to Kelvin
void Tempature(double n);
int main(void)
{
double F;
int status;
printf("Hello, let's convert Fahrenheit to Celsius, then Celsius to Kelvin!\n");
printf("Please enter the tempature in Fahrenheit\n");
status = scanf("%lf", &F);
while (status == 1)
{
Tempature(F);
printf("If you would like to continue type in a new tempature, or enter q to quit.\n");
status = scanf("%lf", &F);
}
return 0;
}
void Tempature(double n)
{
printf("%.2lf Fahrenheit is %.2lf Celsius which is %.2lf Kelvin.\n", n, k_ftc, k_ftc + k_ctk);
}
Okay actually for some reason whenever I compile this program it doesn't make an executable file so I don't know what's wrong with it because it was working last night.
This is the code that I'm trying to compile
#include <stdio.h>
const double k_ftc = (1.8 * n) + 32; //Fahrenheit to Celsius
const double k_ctk = 273.16; //Celsius to Kelvin
void Tempature(double n);
int main(void)
{
double F;
int status;
printf("Hello, let's convert Fahrenheit to Celsius, then Celsius to Kelvin!\n");
printf("Please enter the tempature in Fahrenheit\n");
status = scanf("%lf", &F);
while (status == 1)
{
Tempature(F);
printf("If you would like to continue type in a new tempature, or enter q to quit.\n");
status = scanf("%lf", &F);
}
return 0;
}
void Tempature(double n)
{
printf("%.2lf Fahrenheit is %.2lf Celsius which is %.2lf Kelvin.\n", n, k_ftc, k_ftc + k_ctk);
}