fork download
  1. # include <stdio.h>
  2.  
  3. void myToUpper(char s[]){
  4. int i;
  5.  
  6. for (i=0;s[i]!='\0';i++){
  7. if(s[i]>='a'&& s[i]<='z'){
  8. s[i]=s[i]-32;
  9. }
  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.  
  20. printf("%d:%d",'A','a');
  21. return 0;
  22. }
  23.  
Success #stdin #stdout 0.01s 5312KB
stdin
aBcDe
stdout
aBcDe -> ABCDE
65:97