Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses wincrt;
- type Tab=array[1..12] of char;
- var T:Tab;i,N,NB1,NB2:Byte;{Byte can be replaced with Integer}
- Begin
- Repeat
- writeln('N: ');
- readln(N);
- Until N>0;
- For i:=1 to N do
- Begin
- Repeat
- writeln('T[',i,']= ');
- readln(T[i]);
- Until (T[i] in ['a'..'z','A'..'Z']);
- End;
- NB1:=0;
- NB2:=0;
- For i:=1 to N do
- Begin
- if T[i] in ['a'..'z'] then
- NB1:=NB1+1
- else NB2:=NB2+1;
- End;
- writeln('NB1= ',NB1);
- writeln('NB2= ',NB2);
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement