Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <ctype.h>
- #include <stdlib.h>
- char sor[200];
- int main()
- {
- int szam, i, j, egyezik=0;
- while(scanf("%d ", &szam) && gets(sor) != NULL)
- {
- for(i=0;i<szam;i++)
- {
- if(sor[i]==sor[strlen(sor)-szam+i])
- {
- egyezik++;
- }
- }
- if(egyezik==szam)
- printf("GOOD\n");
- else
- printf("BAD\n");
- egyezik=0;
- }
- return EXIT_SUCCESS;
- }
Advertisement
Add Comment
Please, Sign In to add comment