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.

Reply via email to