Write a program that declares a character array named alphabet and initializes the array to "ABCDEFGHIJKLMNOPQRSTUVWXYZ" In your program, include a FOR LOOP that replaces one character of the array at a time with the lowercase letters a-z. Print the character array to the screen during each iteration of the loop. Hint: Remember that a character array is an array of integer values. Use ASCII values to make the changes.
Okay, I got it to print out everything at once. How would I make it so you press a key, and it does it each time.
Because right now, its showing everything at once.
http://img292.imageshack.us/img292/9...ubitmapyz1.jpg
Code:
#include <iostream.h>
#include <iomanip.h>
#include <string.h>
#include <math.h>
int main()
{
char alphabet[27] = {"ABCDEFGHIJKLMNOPQRSTUVWXYZ"};
for (int i=0;i<=25;i++)
{alphabet[i] = alphabet[i] + 32;
cout << alphabet << "\n";
}
system("pause");
return 0;
}