-
Notifications
You must be signed in to change notification settings - Fork 0
/
leet.c
53 lines (33 loc) · 824 Bytes
/
leet.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// main.c
// leet
//
// Created by spike on 15/12/6.
// Copyright © 2015年 ___spike___. All rights reserved.
//
#include <stdio.h>
#include <string.h>
int main(void){
char str[100];
int j;
scanf("%100s",str);//get input
for ( j = 0; j < strlen(str); j++ )//exchange
{
if ( str[j] == 'A' )
str[j] = '4';
else if ( str[j] == 'E' )
str[j] = '3';
else if ( str[j] == 'G' )
str[j] = '6';
else if ( str[j] == 'I' )
str[j] = '1';
else if ( str[j] == 'O' )
str[j] = '0';
else if ( str[j] == 'S' )
str[j] = '5';
else if( str[j] =='Z')
str[j] = '2';
}
printf("%s",str);
return 0;
}