Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. while(TRUE)
  2. {
  3. R1=1; //Scanning Process
  4. R2=R3=R4=0;
  5. if(C1==1)
  6. {
  7. while(C1==1);
  8. return '1';
  9. }
  10. if(C2==1)
  11. {
  12. while(C2==1);
  13. return '2';
  14. }
  15. if(C3==1)
  16. {
  17. while(C3==1);
  18. return '3';
  19. }
  20. R2=1;
  21. R1=R3=R4=0;
  22. if(C1==1)
  23. {
  24. while(C1==1);
  25. return '4';
  26. }
  27. if(C2==1)
  28. {
  29. while(C2==1);
  30. return '5';
  31. }
  32. if(C3==1)
  33. {
  34. while(C3==1);
  35. return '6';
  36. }
  37. R3=1;
  38. R1=R2=R4=0;
  39. if(C1==1)
  40. {
  41. while(C1==1);
  42. return '7';
  43. }
  44. if(C2==1)
  45. {
  46. while(C2==1);
  47. return '8';
  48. }
  49. if(C3==1)
  50. {
  51. while(C3==1);
  52. return '9';
  53. }
  54. R4=1;
  55. R1=R2=R3=0;
  56. if(C1==1)
  57. {
  58. while(C1==1);
  59. return '*';
  60. }
  61. if(C2==1)
  62. {
  63. while(C2==1);
  64. return '0';
  65. }
  66. if(C3==1)
  67. {
  68. while(C3==1);
  69. return '#';
  70. }
  71. }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement