Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- void play_monotris(char* game) {
- char* alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
- char* pos = 0;
- while(*game++) {
- printf("char: %c\n", *game);
- if(*game != ' ') {
- pos = strchr(alphabet, game);
- printf("pos: %c\n", *pos);
- } else printf("space.\n");
- }
- }
- int main(int argc, char** argv) {
- char game[1000];
- scanf("%[^\n]s", game);
- play_monotris(game);
- // printf("%s\n", game);
- return 0;
- }
Add Comment
Please, Sign In to add comment