fork download
  1. #include <stdio.h>
  2. #include <string.h>
  3. int main()
  4. {
  5. char x[100], y, z;
  6. int count;
  7. printf("string=");
  8. scanf("%s", x);
  9.  
  10. count = 0;
  11. y = 0;
  12. while (count < 100){
  13. if (x[count]=='\0'){
  14. break;
  15. }
  16. else {
  17. count++;
  18. y = x[count];
  19. if ((y >= 'A') && (y <= 'Z')){
  20. z = y + 0x20;
  21. printf("%c", z);
  22. }
  23. else ((y >= 'a') && (y <= 'z'));{
  24. z = y - 0x20;
  25. printf("%c", z);
  26. }
  27. }
  28. }
  29. return 0;
  30. }
Success #stdin #stdout 0s 1792KB
stdin
mikeCAT
stdout
string=IKEc#a!t4�