Перевести код из Паскаля в C++:
var s1, s2: string;
i, ans: longint;
begin
readln(s1);
readln(s2);
ans := 0;
for i := 1 to length(s1) - 1 do
if pos(copy(s1, i, 2), s2) <> 0 then
ans := ans + 1;
writeln(ans)
end.
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2025 SCHOLAR.TIPS - All rights reserved.