Advertisement
Guest User

Untitled

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