On Wednesday, 13 November 2013 at 14:45:52 UTC, John Colvin wrote:
On Wednesday, 13 November 2013 at 14:36:22 UTC, Vincent wrote:
import std.stdio,std.cstream;
void main(string[] args)
{
int first;
int second;
write ("First Number : ");
readf (" %s", &first);
write ("Second Number : ");
readf (" %s", &second);
int result = first + second;
writeln("Result: ", result);
din.getc();
}
_________________________________
Problem: When I run this code why it is automatically exit
when it shows the
result. It allows me to input first numbers and second
number but when
it shows the result it will totally exit and I can't
see the output.
I use D-IDE as my editor and dmd2 as my compiler.
I see you've got plenty of answers so I'll just add: please ask
such questions in digitalmars.D.learn
http://forum.dlang.org/group/digitalmars.D.learn
This wouldn't happen so often if digitalmars.D.learn appeared at
the top of the page.