// // Created by 28018 on 2023/3/8. // #include "stdio.h" #include "string.h" char* func(char *s){ static char ss[1000]; int n=0; int s_len = strlen(s); for (int i=0; i < s_len; ++i) { if(s[i]>='a'&&s[i]<='z'){ s[i]-=32; ss[n++] = s[i]; } else{ ss[n++] = s[i]; } for (int j=0; j < i; ++j) { if(s[i]>='a'&&s[i]<='z'){ } else { ss[n++] = s[i] += 32; } } ss[n++] = '-'; } printf("%s",ss); return ss; } int main(){ char s[26]; gets(s); printf("%s",func(s)); }