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