Przykład nr 3
#include <stdio.h>
#include <stdlib.h>
int main()
{
char c;
printf("Podaj litere A,B lub C: ");
c = getchar();
if (c == 'a')
{
printf("A\n");
} else if (c == 'b')
{
printf("B\n");
} else if (c == 'c')
{
printf("C\n");
} else
{
printf("Podalez zla litere\n");
}
return (0);
}