Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <conio.h>
- #include <ctype.h>
- char seq;
- int seqN;
- int tecla=1, numX;
- int x;
- int m;
- int main()
- {
- printf("Sequencia\n");
- while( seq != '#' )
- {
- seq = _getch();
- seq = toupper( seq );
- x = seq - 64;
- switch( x )
- {
- case 1:
- case 2:
- case 3: tecla = 2; numX = x; break;
- case 4:
- case 5:
- case 6: tecla = 3; numX = x - 3; break;
- case 7:
- case 8:
- case 9: tecla = 4; numX = x - 6; break;
- case 10:
- case 11:
- case 12: tecla = 5; numX = x - 9; break;
- case 13:
- case 14:
- case 15: tecla = 6; numX = x - 12; break;
- case 16:
- case 17:
- case 18:
- case 19: tecla = 7; numX = x - 15; break;
- case 20:
- case 21:
- case 22: tecla = 8; numX = x - 19; break;
- case 23:
- case 24:
- case 25:
- case 26: tecla = 9; numX = x - 22; break;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement