Advertisement
DanSt3fan

A203

May 22nd, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.43 KB | None | 0 0
  1. SCRIPT AS203
  2. function ok = AS203(NR)
  3. ok=1;
  4. EX={'MUE' 'PLM' 'FMM' 'SVF'};
  5. CC=str2num(NR(4:5));
  6. if CC<05 || CC>33
  7.     ok=0;
  8. end
  9. L=NR(7);
  10. if L=='I' || L=='O'
  11.     ok=0;
  12. end
  13. LLL=NR(7:9);
  14. for i=1:length(EX)
  15.     if strcmp(LLL,EX(1,i))==1
  16.         ok=0;
  17.     end
  18. end
  19. end
  20. PROBLEMA A203
  21. NR=input('Numar dorit: ','s');
  22. ok=AS203(NR);
  23. if ok==1
  24.     disp('Numarul este disponibil')
  25. else
  26.     disp('Numarul nu este disponibil')
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement