#include <iostream>
#include <conio.h>
using namespace std;
int main(){
int num_for_enscrypt;
cout<<"Enter a 2-digit number for enscryption:";
cin>>num_for_enscrypt;
if (num_for_enscrypt<0||num_for_enscrypt>=100){
cout<<"Incorrect number. Error.";
getch();
return 0;
}
int n1,n2;
n1=num_for_enscrypt/10; //Determining the first digit;
n2=num_for_enscrypt%10; //Determining the second digit;
cout<<"Enscrypted number:"<<(n2+7)%10<<(n1+7)%10;
getch();
}
Comments
Leave a comment