Lessons do not read on the subject ..... ..... waste of blood for a long time
Finally, see solution to a problem, although he did not find a topic to read, but the solution to a problem or learned from some ":?" Expression skills, you can record it
Really .... I got to be patient and read topic ah .......
#include<stdio.h> #include<ctype.h> #include<string.h> int main(void){ int p1, p2, p3; int i, j, k; char s[150]; char bf, af; scanf("%d%d%d%s", &p1, &p2, &p3, s); for(i=0; i<strlen(s); i++){ bf = s[i-1]; af = s[i+1]; if(s[i]=='-' && bf < af && ((bf>='0'&&af<='9') || ((bf>='a'&&af<='z')))){ for(p3==1?j=bf+1:j=af-1; p3==1?j<af:j>bf; p3==1?j++:j--){ if(p1==2) for(k=0; k<p2; k++) printf("%c", toupper(j)); else if(p1 == 3) for(k=0; k<p2; k++) printf("*"); else for(k=0; k<p2; k++) printf("%c", j); } }else{ printf("%c", s[i]); } } return 0; }