Advertisement
Guest User

Untitled

a guest
Feb 24th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.95 KB | None | 0 0
  1. program Bilet;
  2. var
  3.     password: string;
  4.     hasBad: Boolean;
  5.     hasNumber: Boolean;
  6.     hasEnglish: Boolean;
  7.     C: Char;
  8. begin
  9.     readLn(password);
  10.    
  11.     if Length(password) < 9 then
  12.         WriteLn('нет')
  13.     else
  14.         begin
  15.             hasBad := false;
  16.             hasNumber:= false;
  17.             hasEnglish := false;
  18.            
  19.             for C in password do
  20.             begin
  21.                 if C in ['0'..'9'] then
  22.                     hasNumber := true
  23.                 else
  24.                     if C in ['a'..'z'] then
  25.                         hasEnglish := true
  26.                     else
  27.                         hasBad := true;
  28.             end;
  29.            
  30.             if hasBad then
  31.                 WriteLn('нет')
  32.             else
  33.                 if hasNumber and hasEnglish then
  34.                     WriteLn('да')
  35.                 else
  36.                     WriteLn('нет')
  37.         end;
  38.        
  39. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement