kazooie21
Jan 24th, 2000, 10:12 AM
I'm currently working a program that will allow the user to enter their last name, and first and middle initial. Here's my code:
begin
write('enter your last name: ');
readln(LastName);
write('enter your first initial: ');
readln(initialf);
write('enter your middle initial: );
readln(initialm);
writeln(LastName, ', initialf, ', initialm)
end.
When I run it for the name R.M. Jones, I get the following: Jones(for the last name), initialf(for the first initial), and M(for the middle initial). Can someone tell me what's wrong?
begin
write('enter your last name: ');
readln(LastName);
write('enter your first initial: ');
readln(initialf);
write('enter your middle initial: );
readln(initialm);
writeln(LastName, ', initialf, ', initialm)
end.
When I run it for the name R.M. Jones, I get the following: Jones(for the last name), initialf(for the first initial), and M(for the middle initial). Can someone tell me what's wrong?