On 5/16/22 15:25, kdevel wrote:

>     string a;
>     a = readln();
>     writeln(a);

> consumes that newline from your first input resulting in variable a
> containing the empty string ending with a newline.

Great catch! I should put this combination in my chapter.

> I am not sure, why %s fits here. I would have expected a %d format for
> parsing the integer.

I learned to read %s as "whatever the type of the argument is" (not "string").

Ali

Reply via email to