I'm fairly new to C and I've run into a problem that I can't seem to figure out. When I try to run a program, the command prompt window will flash really fast and close. How do I get the .exe to stay open?
I use Dev-C/C++,
Windows Service pack 2
2.8 ghz
516 ram
And it's not with just one program either, every source I try the command prompt window just flashes really fast.
Some sources I use:
andCode:#include <stdio.h> main() { printf("hello, world\n"); }
Code:#include <stdio.h> #include <stdlib.h> #include <unistd.h> #define TAX_RATE 0.05 main() { float balance; float tax; float total; balance = 100; tax = TAX_RATE * balance; total = tax + balance; printf("If you spend $%.1f, the tax will be $%.1f ... The total is $%.2f.", balance, tax, total); }



LinkBack URL
About LinkBacks


