File won't run [message #874518] |
Mon, 21 May 2012 00:34  |
Eclipse User |
|
|
|
Hi guys,
So I'm writing a C program that requires user input, except for some reason everytime I try to run the program, nothing appears in the console screen. So I try some other program that requires no user input, and that works out fine. I try to run the program via command line, and that works fine. Any ideas?
code:
#include <stdio.h>
int main(void)
{
float original_amount, amount_with_tax;
printf("Enter an amount: ");
scanf("%f", &original_amount);
amount_with_tax = original_amount * 1.05f;
printf("With tax added: $%.2f\n", amount_with_tax);
return 0;
}
|
|
|
|
Powered by
FUDForum. Page generated in 0.23952 seconds