Domanda

I want for a variable to be 'name' for example. If I use read(x) and for that variable to be char it will only load the first letter. So if i type 'name' it would be only the first letter.

È stato utile?

Soluzione

the word you refer to is actually called string, so you can declare a variable and read string in it:

var

    msg:string[10];

begin

    readln(msg);
    writeln(msg);

end.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top