with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
procedure Q5E is
N : Integer;
A, B : array (1 .. 100) of Integer; -- Tamanho máximo dos vetores
Produto_Inteiro : Integer := 0; -- Inicializa o produto interno
I : Integer;
begin
-- Leitura do tamanho dos vetores
Put_Line("Digite o tamanho dos vetores (n):");
Get(N);
-- Leitura do vetor A
Put_Line("Digite os elementos do vetor A:");
for I in 1 .. N loop
Get(A(I));
end loop;
-- Leitura do vetor B
Put_Line("Digite os elementos do vetor B:");
for I in 1 .. N loop
Get(B(I));
end loop;
-- Cálculo do produto interno
for I in 1 .. N loop
Produto_Inteiro := Produto_Inteiro + (A(I) * B(I));
end loop;
-- Exibição do resultado
Put_Line("Produto interno: " & Integer'Image(Produto_Inteiro));
end Q5E;
d2l0aCBBZGEuVGV4dF9JTzsgdXNlIEFkYS5UZXh0X0lPOwp3aXRoIEFkYS5JbnRlZ2VyX1RleHRfSU87IHVzZSBBZGEuSW50ZWdlcl9UZXh0X0lPOwoKcHJvY2VkdXJlIFE1RSBpcwogICBOIDogSW50ZWdlcjsKICAgQSwgQiA6IGFycmF5ICgxIC4uIDEwMCkgb2YgSW50ZWdlcjsgLS0gVGFtYW5obyBtw6F4aW1vIGRvcyB2ZXRvcmVzCiAgIFByb2R1dG9fSW50ZWlybyA6IEludGVnZXIgOj0gMDsgLS0gSW5pY2lhbGl6YSBvIHByb2R1dG8gaW50ZXJubwogICBJIDogSW50ZWdlcjsKCmJlZ2luCiAgIC0tIExlaXR1cmEgZG8gdGFtYW5obyBkb3MgdmV0b3JlcwogICBQdXRfTGluZSgiRGlnaXRlIG8gdGFtYW5obyBkb3MgdmV0b3JlcyAobik6Iik7CiAgIEdldChOKTsKCiAgIC0tIExlaXR1cmEgZG8gdmV0b3IgQQogICBQdXRfTGluZSgiRGlnaXRlIG9zIGVsZW1lbnRvcyBkbyB2ZXRvciBBOiIpOwogICBmb3IgSSBpbiAxIC4uIE4gbG9vcAogICA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