Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program lettura; (*programma che cerca una lettera stabilita in un testo scritto dall'utente
- fatto da Francesco Crosa*)
- uses crt;
- var a:string;
- b:char;
- c,d,e:integer;
- BEGIN
- clrscr;
- writeln('inserire testo');
- readln(a);
- writeln('inserire lettera da cercare');
- readln(b);
- c:=length(a);
- e:=0;
- for d:=1 to c do
- begin
- if a[d]=b then e:=e+1;
- end;
- writeln('numero di lettere cercate presenti= ',e);
- writeln;
- writeln('premere qualsiasi tasto per uscire');
- readln;
- END.
Add Comment
Please, Sign In to add comment