fork download
  1. # include <stdio.h>
  2.  
  3. void myToUpper(char s[]){
  4. int i;
  5. for(i=0; s[i]!='\0'; i++){
  6. if(s[i]>=97&&s[i]<=122) s[i]-=32;
  7. }
  8. }
  9.  
  10. int main(){
  11. char s[100];
  12. scanf("%s",s);
  13. printf("%s -> ",s);
  14. myToUpper(s);
  15. printf("%s\n",s);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5284KB
stdin
aBcDe
stdout
aBcDe -> ABCDE