Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure sampleStrLoop();
- Var
- i,icount,strBr: integer;
- Const
- listStr: string = 'onil-chan' ;
- begin
- icount:= 0; strBr:= 0;
- for i := 1 to Length(listStr) do
- begin
- if UpCase(listStr[i]) in ['A','E','I','O','U'] then
- begin
- self.ListResult.Items.Add(listStr[I]);// TListBox
- icount := icount + 1;
- end
- else
- begin
- strBr := strBr + 1;
- end;
- end;
- ShowMessage('Брой итерации на цикъла фор: ' + (i-1).Tostring() + ', ' + 'Брой на намерeните знаци: ' + icount.Tostring() +
- ', ' + 'Брой итерации на несравнимите стойности: ' + strBr.ToString() );
- end;
Advertisement
Add Comment
Please, Sign In to add comment