The problem states to use a loop display character from the ASCII codes 0 through 127 and to display 16 character per line.
I am using Borland C++ 4.5 so I need the older programming way of doing it.
This is what i have so far.
#include <iostream.h>
int main()
{
for (char letter = 0; letter < 127; letter++)
{
for (int num = 0; num <= 16; num++)
{
cout << letter;
if (num == 16)
break;
}
cout << endl;
}
return 0;
}
What this does is repeat the same ASCII character over and over on a line and goes to the next line and repeats. What I need is to have the ASCII character not repeat and show all character 0-127 which should only take 8 lines.