Mega Code Archive
Using the cin and cout Objects with Arrays
#include
using namespace std;
const int MAX = 3;
int main ()
{
char grades[MAX];
for (int i = 0; i < MAX; i++)
{
cout << "Enter grade for test #" << i + 1 << ":";
cin >> grades[i];
}
return 0;
}