Subversion Repositories SvarDOS

Rev

Rev 546 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
546 mateuszvis 1
/*
2
 * reads stdin and writes to stdout after hacker-like conversion
3
 */
4
 
5
#include <stdio.h>
6
 
7
int main(void) {
8
  int c;
9
 
10
  while ((c = getchar()) != EOF) {
11
    switch (c) {
12
      case 'o':
13
      case 'O':
14
        c = '0';
15
        break;
16
      case 'i':
17
      case 'I':
18
        c = '1';
19
        break;
20
      case 'A':
21
        c = '4';
22
        break;
23
      case 'a':
24
        c = '@';
25
        break;
26
      case 'S':
27
        c = '$';
28
        break;
29
      case 'e':
30
      case 'E':
31
        c = '3';
32
        break;
33
      case '0':
34
        c = 'o';
35
        break;
36
    }
37
    putchar(c);
38
  }
39
 
40
  return(0);
41
}