with Ada.Text_IO; use Ada.Text_IO;
procedure Q5A is
Input_String : String(1 .. 100); -- Tamanho máximo da string
Inverted_String : String(1 .. 100);
Length : Natural;
begin
-- Leitura da string de entrada
Put_Line("Digite uma string:");
Get_Line(Input_String, Length);
-- Inversão da string
for I in 1 .. Length loop
Inverted_String(I) := Input_String(Length - I + 1);
end loop;
-- Exibe a string invertida
Put_Line("String invertida: " & Inverted_String(1 .. Length));
end Q5A;
d2l0aCBBZGEuVGV4dF9JTzsgdXNlIEFkYS5UZXh0X0lPOwoKcHJvY2VkdXJlIFE1QSBpcwogICBJbnB1dF9TdHJpbmcgIDogU3RyaW5nKDEgLi4gMTAwKTsgLS0gVGFtYW5obyBtw6F4aW1vIGRhIHN0cmluZwogICBJbnZlcnRlZF9TdHJpbmcgOiBTdHJpbmcoMSAuLiAxMDApOwogICBMZW5ndGggICAgICAgIDogTmF0dXJhbDsKCmJlZ2luCiAgIC0tIExlaXR1cmEgZGEgc3RyaW5nIGRlIGVudHJhZGEKICAgUHV0X0xpbmUoIkRpZ2l0ZSB1bWEgc3RyaW5nOiIpOwogICBHZXRfTGluZShJbnB1dF9TdHJpbmcsIExlbmd0aCk7CgogICAtLSBJbnZlcnPDo28gZGEgc3RyaW5nCiAgIGZvciBJIGluIDEgLi4gTGVuZ3RoIGxvb3AKICAgICAgSW52ZXJ0ZWRfU3RyaW5nKEkpIDo9IElucHV0X1N0cmluZyhMZW5ndGggLSBJICsgMSk7CiAgIGVuZCBsb29wOwoKICAgLS0gRXhpYmUgYSBzdHJpbmcgaW52ZXJ0aWRhCiAgIFB1dF9MaW5lKCJTdHJpbmcgaW52ZXJ0aWRhOiAiICYgSW52ZXJ0ZWRfU3RyaW5nKDEgLi4gTGVuZ3RoKSk7CmVuZCBRNUE7Cg==