Hello I am stuck here...i need little help if some one could please...
The problem is I want to enter four digits user input and then encrypt that input in to something different...following is the algorithm that i have to use to encrypt...
Replace each digit by (the sum of that digit plus 7) modulus 10.Then swap the first digit with the
third, and swap the second digit with the fourth.
i have written something like...
Please help me with solving this problem...this problem is from Deitel and Deitel How to Program C Sharp.
Thank You.
RentedLips
§ Rented Lips §
----------------
Begning To Learn
----------------
The problem is I want to enter four digits user input and then encrypt that input in to something different...following is the algorithm that i have to use to encrypt...
Replace each digit by (the sum of that digit plus 7) modulus 10.Then swap the first digit with the
third, and swap the second digit with the fourth.
i have written something like...
Code:
int input = 0;
int tInput = 0;
string myString = "";
char c;
Console.Write("\n Enter number to encrypt >> ");
myString = Console.ReadLine();
for (int i = 0; i < myString.Length; i++)
{
tInput = myString[i];
input = input + int32.Parse(tInput);
Console.WriteLine(input);
}
Please help me with solving this problem...this problem is from Deitel and Deitel How to Program C Sharp.
Thank You.
RentedLips
§ Rented Lips §
----------------
Begning To Learn
----------------