include stdio include stdlib include iostream include conio include st

 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
#include <stdio.h>
#include <stdlib.h>
//#include <iostream>
//#include <conio.h>
#include "stdafx.h"
using namespace std;
int main(int argc, char *argv[])
{
int a;
char str[80];
printf_s("Type text string\n");
gets_s(str);
//puts(str);
int i = 0;
while (str[i] != '\0') {
str[i] = ('a' <= str[i] && str[i] <= 'h') ? (str[i] - 32) : str[i];
str[i] = (str[i] == '1') ? '@' : str[i];
str[i] = (str[i] == '6') ? '#' : str[i];
str[i] = (str[i] == '4') ? '&' : str[i];
str[i] = (str[i] == '7') ? '+' : str[i];
++i;
}
puts(str);
scanf_s("%s",str);
return 0;
}