aboutsummaryrefslogtreecommitdiff
path: root/7.1/main.c
blob: f210c39f9f3262204edb1a11432845d7bbb2e598 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main(int argc, char *argv[])
{
	char c;

	if (!strcmp(argv[0], "lower"))
		while ((c = getchar()) != EOF)
			putchar(tolower(c));
	else 
		while ((c = getchar()) != EOF)
			putchar(toupper(c));

	return 0;
}