?? ac1038.pas
字號:
program ural1038;
var
c:char;
sen,wor:boolean;
mis:integer;
function cap(c:char):boolean;
begin
if (c>='A') and (c<='Z') then cap:=true else cap:=false;
end;
function small(c:char):boolean;
begin
if (c>='a') and (c<='z') then small:=true else small:=false;
end;
begin
sen:=false;wor:=false;mis:=0;
repeat
read(c);
if c<' ' then begin
wor:=false;
continue;
end;
if (not sen) and small(c) then inc(mis);
if wor and cap(c) then inc(mis);
if (c='.') or (c='!') or (c='?') then
sen:=false
else if cap(c) or small(c) then
sen:=true;
if cap(c) or small(c) then wor:=true else wor:=false;
until eof;
writeln(mis);
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -