Something like this:
#include<iostream>
using namespace std;
// the function below takes an integer and outputs a corresponding letter
void convert (int num)
{
...
}
int main
{
int num;
cout << "Enter an integer" << endl;
cin >> num;
convert (num);
system("pause");
return 0;
}
E.g.
Input: 0 , Output: "A''
Input: 1 , Output: "B''
Input: 25 , Output: "Z''
Input: 26 , Output: "A'' (repeats the alphabet again)
Input: 2033, Output: ''F''
I've thought of using a switch in the function convert but of course there are too many integers ):
So what approach can I use? I'd rather not use arrays I haven't learnt them yet.