fork download
  1. //Q84. Convert a lowercase string to uppercase without using built-in functions.
  2. #include <stdio.h>
  3. int main() {
  4. char str[100];
  5. int i;
  6. gets(str);
  7. for(i=0; str[i]!='\0'; i++)
  8. if(str[i]>='a' && str[i]<='z')
  9. str[i] = str[i] - 32;
  10. printf("%s", str);
  11. }
  12.  
  13.  
Success #stdin #stdout 0.01s 5280KB
stdin
hello
stdout
HELLO