how to print an array in cpp in single line
int Grades[5] = { 3, 2, 5, 2 };
cout << "Grades: ";
for (int i = 0; i < sizeof(Grades)/sizeof(int); i++) {
cout << Grades[i] << ", "; //minus the commas, remove (<< ", ") or to space out the grades, just remove the comma
}