Remember to checkout the Codesnip below to review the C++ code yourself! Feel free to copy the code, but I ask that you please provide credit if you leave the code unchanged when you use it.
//Programmer: Nazmus //Program: Structs //Website: www.EasyProgramming.net #include <iostream> #include <string> using namespace std; struct student { string name; int grade; }; int main() { student pupil1; student pupil2; cout << "Please enter student's name: "; cin >> pupil1.name; cout << "Please enter student's grade: " ; cin >> pupil1.grade; cout << "Please enter student's name: "; cin >> pupil2.name; cout << "Please enter student's grade: " ; cin >> pupil2.grade; cout << "Name" << " " << "Grade" << endl; cout << pupil1.name << " " << pupil1.grade << endl; cout << pupil2.name << " " << pupil2.grade << endl; system("pause"); }