Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <windows.h>
- #include <stdlib.h>
- #include <string.h>
- #include <conio.h>
- int main(void){
- SetConsoleCP (1251);
- SetConsoleOutputCP (1251);
- char password[100],c;
- int i;
- i=0;
- while ((password[i]=getch())!='r'){
- if (password[i]=='b' && i!=0){
- printf("%s", "b b");
- i--;
- continue;
- }
- printf("%c", '*');
- i++;
- }
- printf("npassword is %sn", password);
- return 0;
- }
- Вывод при пароле "qwe"(звездочки это еще ввод самого пароля)
- ***
- r╗Мюad is qwe
- Вывод при пароле qwerty
- ******
- ╗Мюaword is qwerty
- Вывод при пароле qwertyuiop
- **********
- password is qwertyuiop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement