Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <locale.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <Windows.h>
- void inputString(char* name) {
- printf("Enter your string: ");
- fgets(name, 100, stdin);
- }
- void changeString(name) {
- printf("The result of program is: ");
- char* newName = name;
- char c = 0;
- while (c = *newName++)
- {
- if (c == 'a' || c == 'а')
- {
- *(newName - 1 )= '@';
- }
- }
- }
- void outputString(name) {
- printf("The result of program is: ");
- char* newName = name;
- char c = 0;
- while (c = *newName++)
- {
- printf("%c", c);
- Sleep(200);
- }
- }
- void outputString1(name) {
- printf("The result of program is: ");
- char* newName = name;
- char c = 0;
- while (c = *newName++)
- {
- if (c == 'a' || c == 'а')
- {
- c = '@';
- printf("%c", c);
- }
- else {
- printf("%c", c);
- }
- Sleep(200);
- }
- }
- int main()
- {
- char name[100];
- inputString(&name);
- changeString(name);
- outputString(name);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement