Advertisement
petrabarus

Untitled

Jan 18th, 2012
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.48 KB | None | 0 0
  1. var
  2.         halo:string;
  3.         dunia:array[1..10] of char;
  4.         skor,i:integer;
  5. begin
  6.         readln(halo);
  7.         halo:=lowercase(halo);
  8.         dunia[1]:='h';
  9.         dunia[2]:='a';
  10.         dunia[3]:='l';
  11.         dunia[4]:='o';
  12.         dunia[5]:=' ';
  13.         dunia[6]:='d';
  14.         dunia[7]:='u'; dunia[8]:='n'; dunia[9]:='i'; dunia[10]:='a';
  15.         for i:=1 to 10 do
  16.                 if (copy(halo,i,1) = dunia[i]) then skor:=skor+1;
  17.         writeln(skor);
  18. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement