reverse sentence

help me to write program code for a program that inputs a tring and outputs the same name in reverse i.e. John = nhoJ

Comments

  • You write some program and somebody will correct it, fix it, repair it, or make it unbelieveable. After you [b][color=Blue]inputs a tring[/color][/b] then you need to count the length then starting from the maximum length downto 1 pick off the characters in that string and put them in another string then write it out or display as you go.
  • // reverse a string
    program reverse;

    procedure Main();
    var
    before : string;
    len : integer;
    begin
    WriteLn('Enter string ');
    ReadLn(before);
    len:=length(before);
    repeat
    Write(before[len]);
    len:=len-1;
    until len =0;


    end;

    begin
    Main();
    end.
  • My dear friend thanks for yor assistance and keep on doing that for am still a novicee in this area, all the best
  • u welcome... m novice as well tats why i come to this forum and try to solve other ppl problems so tat i can learn..tats the best way to learn

    so all those problems r working???? i have tested them, they should work fine....if u need any other help in pascal then let me know

    regards
    Rock
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories