Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » File won't run
File won't run [message #874518] Mon, 21 May 2012 00:34 Go to next message
andrew gu is currently offline andrew gu
Messages: 1
Registered: May 2012
Junior Member
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;
}
Re: File won't run [message #874594 is a reply to message #874518] Mon, 21 May 2012 03:55 Go to previous message
Axel Mueller is currently offline Axel Mueller
Messages: 1927
Registered: July 2009
Senior Member
See http://wiki.eclipse.org/CDT/User/FAQ#Eclipse_console_does_not_show_output_on_Windows

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Paste Corrupts Code?
Next Topic:Selection of Language Extension
Goto Forum:
  


Current Time: Fri Apr 25 02:43:01 EDT 2014

Powered by FUDForum. Page generated in 0.02793 seconds