Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program homework;
- var word:string; i,n:integer;
- c:char;
- begin
- write('Word: ');
- readln(word);
- write('Character: ');
- readln(c);
- n:=0;
- write('Count of char ' + c + ' = ');
- for i:=1 to length(word) do
- if word[i] =c then n:=n+1;
- write(n);
- readln();
- end.
Add Comment
Please, Sign In to add comment