Advertisement
Guest User

Untitled

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