```
import java.util.Scanner;
public class encryption
{
public static void main (string[] args)
{
int temp, first,second, third, fourth,encryped;
int a = first,b = second,c = third, d = fourth;
int a = c,c = a;
int b = d,d = b;
System.out.println("After swapping a = " + a + "c = " + c)+System.out.println("After swapping c = " + c + "a = " + a)
System.out.println("After swapping b = " + b + "d = " + d)+System.out.println("After swapping d = " + d + "b = " + b)
}
double integer;
Scanner scan = new Scanner (System.in);
System.out.print("Enter a four digit integer:");
while (integer>0)
{
temp = integer % 1000;
temp+7;
first = temp % 10;
temp = integer % 1000;
temp % 100;
temp+7;
second = temp % 10;
temp = integer % 1000;
temp % 100;
temp & 10;
temp+7;
third = temp % 10;
temp = integer % 1000;
temp % 100;
temp & 10;
temp+7;
fourth = temp % 10;
new second = fourth;
first = new third * 1000;
third = temp * 10;
temp = new second;
new second = new fourth * 100;
fourth integer = temp;
encrypted = first integer + second integer + third integer + fourth integer;
}
System.out.println("The Encrypted number is:");
System.in.println("Four digit number:");
}
```

0