#include<stdio.h> int main() { int i = 3, x; int a[4]; int temp; scanf("%d", &x); while (i != -1) { a[i] = x % 10; x = x / 10; i--; } for (i = 0; i < 4; i++) { a[i] = a[i] + 9; } for (i = 0; i < 4; i++) { a[i] = a[i] % 10; } for (i = 0; i < 2; i++) { temp = a[i]; a[i] = a[i + 2]; a[i + 2] = temp; } printf("The encrypted number is "); for (i = 0; i < 4; i++) { printf("%d", a[i]); } return 0; }