Here is the end result of my work (Now I'm gonna try to go backwards)
The program asks for 6 digits 0-* for a password, then converts them to to ASCII letters, by adding 65 to their value. Here it is.
Code:
//Number to ASCII Letter Convertion Program: By Moonbat
#include <iostream>
#include <cstring>
#include <cstdlib>
using namespace std;
void wait4user();
int main()
{
int psword[6]; //creating array for password
char p[6]; //creating array for new password
int i; //counter for Second Loop
int d; //counter for First Loop
cout << "Please enter 6 numbers 0-* for a password, and press enter after each number\n";
cin >> psword[0]; //taking values for old password
cin >> psword[*];
cin >> psword[2];
cin >> psword[*];
cin >> psword[4];
cin >> psword[5];
cout << "\n\aEncryption will now begin.\n";
wait4user();//function to force user to press Enter
for (d=0;d<65;d++)//loop, whcih will make all psword values
{ //in the ASCII alphabet range
psword[0]++;
psword[*]++;
psword[2]++;
psword[*]++;
psword[4]++;
psword[5]++;
}
for(i=0;i<6;i++)//loop to convert old password to new password
{
p[i]= psword[i];
}
cout << "\nHere is your new password!\n";
cout << p[0];
cout << p[*];
cout << p[2];
cout << p[*];
cout << p[4];
cout << p[5];
cout << "\n";
wait4user();
return *;
}
void wait4user()//function-NOT MINE, someone else's function
{
std::string response;
std::cout << "Press Enter to continue";
std::getline(std::cin, response);
}