Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <ctype.h>
- void main(){
- int N=3,i;
- char Ni[N],n;
- printf("Введите размер массива\n");
- scanf("%d",&N);
- if(N >100)
- {
- printf("Размер массива не соответсвует условию\n");
- return;
- };
- for (i=0;i<N+1;i++){
- scanf("%c",&Ni[i]);
- n=Ni[i];
- if(isdigit(n)) {
- n = n -'0';
- n = 9- n;
- n = n +'0';
- Ni[i]= n;
- } }
- printf("Измененный массив");
- for (i=0;i<N+1;i++)
- printf("%c\n",Ni[i]);
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement