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