On 11/13/2013 08:59 PM, Vincent wrote:

This is the code. where or what code will I use for clear the screen?

My Linux console environment has 'clear'. That's why I used system("clear") below. You may need to use system("cls") if you are e.g. on Windows.

import std.stdio;
import std.process;
import core.thread;

void main(string[] args)
{
    while (true)
    {
        writeln ("Calculator Menu");
        write ("Selected Number: ");

        int operation;
        readf (" %s", &operation);

        enum duration = 3.seconds;

        writefln("Thank you for %s! See you in %s.", operation, duration);
        Thread.sleep(duration);

        system("clear");
    }
}

Ali

Reply via email to