#include #include #include int main() { int pocet,sifra; char *slovo;//[10000]; slovo=(char*)malloc(sizeof(char)*10000); char *slovo2;//[10000]; slovo2=(char*)malloc(sizeof(char)*10000); int i = 0,j = 0,m=0; int posun = 0; while (1) { scanf("%d\n",&sifra); slovo[0]='\0'; slovo2[0]='\0'; if (sifra==0) return 0; do { scanf("%s",slovo+strlen(slovo)); } while ('\n' != getchar()); if (sifra>strlen(slovo)) { for (i=0;i= 'a' && slovo[i] <= 'z') ? slovo[i] - ('a' - 'A') : slovo[i]; } printf("%s\n",slovo); continue; } posun = strlen(slovo) / sifra + 1; //0 alebo 1 podla zvysku //printf("posun:%d\n",posun); for (i=0;i=strlen(slovo)) j-=strlen(slovo); } } slovo2[i]='\0'; for (i=0;i= 'a' && slovo2[i] <= 'z') ? slovo2[i] - ('a' - 'A') : slovo2[i]; } //printf("A%d a%d",'A','a'); printf("%s\n",slovo2); } return 0; }