Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses graphABC;
- var
- s: string;
- i, ck, cn: integer;
- begin
- readln(s);
- SetFontColor(clBlue);
- if(s[1]='К')or(s[1]='к') then
- begin
- SetFontColor(clRed);
- ck:=ck+1;
- end else cn:=cn + 1;
- write(s[1]);
- for i:=2 to s.Length do
- begin
- SetFontColor(clBlue);
- if(s[i-1]=' ')and((s[i]='К')or(s[i]='к')) then
- begin
- SetFontColor(clRed);
- ck := ck+1;
- end
- else if(s[i-1]=' ') then cn:=cn + 1;
- write(s[i]);
- end;
- writeln;
- write('длинное предложение с описанием ответа = ',ck/(cn+ck)*100);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement