Advertisement
Guest User

Untitled

a guest
Feb 25th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.50 KB | None | 0 0
  1. function check2 (str1,str2:string):boolean;
  2.  var i,j,count,count2:integer;
  3.      
  4. begin
  5.    i:=1;
  6.    result:=true;
  7.    while (i<=length(str2)) and result  do
  8.       begin
  9.         count:=0;
  10.         for j:=1 to length(str2) do  
  11.             if str2[i]=str2[j] then
  12.                 inc(count);
  13.          count2:=0;
  14.         for j:=1 to length(str1) do
  15.             if str2[i]=str1[j] then
  16.                 inc(count2);
  17.        writeln(count,count2);
  18.        result:= count=count2;
  19.        inc(i);
  20.        end;
  21.  end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement