#include<stdio.h>intmain(){int new,con,i;scanf("%d%d",&new,&con);int a, b, c, d;
d = new %10;
new = new /10;
c = new %10;
new = new /10;
b = new %10;
new = new /10;
a = new %10;if(con==1){
a =(a +7)%10;
b =(b +7)%10;
c =(c +7)%10;
d =(d +7)%10;
i = a;
a = c;
c = i;
i = b;
b = d;
d = i;printf("After encrypting the number is %d%d%d%d",a,b,c,d);}elseif(con==0){
i = a;
a = c;
c = i;
i = b;
b = d;
d = i;if(a>6&&a<=9){
a=a-7;}else{
a=a+3;}if(b>6&&b<=9){
b=b-7;}else{
b=b+3;}if(c>6&&c<=9){
c=c-7;}else{
c=c+3;}if(d>6&&d<=9){
d=d-7;}else{
d=d+3;}printf("After decrypting the number is %d%d%d%d",a,b,c,d);}return0;}
B.实验4_10_加密解密#include<stdio.h>int main() { int new,con,i; scanf("%d%d", &new,&con); int a, b, c, d; d = new % 10; new = new / 10; c = new % 10; new = new / 10; b = new % 10; new = new / 10; a = new %