Cod sursa(job #223750)
Utilizator | Data | 29 noiembrie 2008 12:43:06 | |
---|---|---|---|
Problema | Text | Scor | 0 |
Compilator | fpc | Status | done |
Runda | Arhiva de probleme | Marime | 0.34 kb |
Program Textul;
Type Vector=array[1..10000] of char;
var v:Vector;
i,j:integer;
c:char;
f:text;
nl,nc:integer;
begin
assign(f, 'text.in');
reset(f);
i:=1;
nl:=0;
while not eof(f) do
begin
read(f, v[i]);
i:=i+1;
nl:=i;
end;
nc:=1;
for i:=1 to nl do
if v[i]=' ' then nc:=nc+1;
writeln(nc);
readln;
end.