Hi there,
quick (and I am sure) simple question on a program I have just created.
here's the code:
#include<iostream>
using namespace std;
int main()
{
char letter;
int counter=0;//set the counter to 0
for (letter=65; letter<=122; letter++)
{if ((((((letter==91)||(letter==92)||(letter==93)||(letter==94)
||(letter==95)||(letter==96))))))continue;
counter++;//increment the counter in the loop
if (counter==27)//counter condition
cout<<" \n";
cout<<letter<<" ";
}
counter=0;//reset the counter
return 0;
}
what's bugging me is the counter. I included
int counter=0;
because I wante to have a space between the upper case alphabet and the lower case one, but I had to make it equal to 27 to get the space right and the letters of the alphabet are 26...why is that?
thanks