diff options
author | Michael Hunteman <michael@huntm.net> | 2023-07-04 17:03:53 -0500 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2023-07-06 17:23:45 -0500 |
commit | bfce8f0d0d828209ec0bec71371ee94a7ad62d3e (patch) | |
tree | bdf49ca788ca1ca030d5b1cccfd0c9dffeb3f69f /two/cond.c |
Initial commit
Diffstat (limited to 'two/cond.c')
-rw-r--r-- | two/cond.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/two/cond.c b/two/cond.c new file mode 100644 index 0000000..5a7b88b --- /dev/null +++ b/two/cond.c @@ -0,0 +1,13 @@ +#include <stdio.h> + +int +main() +{ + char s[] = "fOobArBaz"; + for (int i = 0; s[i] != '\0'; ++i) { + (s[i] >= 'A' && s[i] <= 'Z') ? printf("%c", s[i] + 32) + : printf("%c", s[i]); + } + printf("\n"); + return 0; +} |