On Friday, 19 November 2021 at 17:36:55 UTC, BoQsc wrote:
Let's say I want to write a simple program that asks for an input of a single character. After pressing a single key on a keyboard, the character is printed out and the program should stop.

```D
import std.stdio;

void main()
{
        while (true)
        {
                char c;
                scanf("%c", &c);
                
                writefln(0x"%c (%1$x %1$d) is inputed", c);
        }
}
```

Reply via email to