Hi all,
Basically, this is what I want:
A Program that takes in the first 3 letters of a sentence/string, and then it takes the last letter of that 3 letter string and outputs it. The program runs, but it just wont show the letter, can anyone tell me what Im doing wrong? I cant for the life of me figure it out:
I just dont get it!Code:var word, Left, right: string; function Oneletter(S: String):String; begin S:=Rightstr(S,1); S:=result; end; begin Writeln('Please Type'); readln(Word); Left:=Leftstr(Word,3); Right:= Oneletter(Left); writeln(Right); readln; end.
Thanks!!
Last edited by WingedPanther; 02-10-2009 at 10:36 AM. Reason: add code tags (the # button)
S:=result;
should be
result := S;
Such a simple matter >< I cant believe it! Thanks!!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks