Skip to content

Instantly share code, notes, and snippets.

@emsesc
Created February 2, 2024 16:53
Show Gist options
  • Save emsesc/c95d171c7e09ac8cbccac9cb3591cef5 to your computer and use it in GitHub Desktop.
Save emsesc/c95d171c7e09ac8cbccac9cb3591cef5 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char** argv) {
char toLower[1000];
fgets(toLower, sizeof(toLower), stdin);
for (int i = 0; toLower[i] != '\0'; i ++) {
if (toLower[i] > 64 && toLower[i] < 91) {
printf("%c", toLower[i] + 32);
} else {
printf("%c", toLower[i]);
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment