Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <conio.h>
- #include <stdlib.h>
- #include <stdio.h>
- int main()
- {
- int length = 0;
- int pospos = 0;
- int posarrays[10] = {3,4,5,7,8,9,11,12,14,15};
- int pos = posarrays[pospos];
- char mask[17] = "+7(***)***-**-**";
- printf("%s", mask);
- while(length != 10){
- int ch = getch();
- if(ch >= '0' && ch <= '9'){
- length++;
- mask[pos] = ch;
- system("cls");
- pospos++;
- pos = posarrays[pospos];
- printf("%s", mask);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement