summaryrefslogtreecommitdiff
path: root/wk2/lect2/lowercase.c
blob: ee473aed5edc8423d31e30e72576fb1a3d0b704b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <ctype.h>
#include <cs50.h>
#include <string.h>

int main(void)
{
    string s = get_string("Before: ");
    printf("After: ");
    for (int i = 0, n = strlen(s); i < n; i++)
    {
        printf("%c", tolower(s[i]));
    }
    printf("\n");
}