Answer on Question #48815, Engineering, Other
#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
struct Student
{
string name;
int mark1;
int mark2;
int mark3;
};
int main()
{
Student st;
cout <<"enter student's name: ";
cin >> st.name;
cout <<"enter student's first mark: ";
cin >> st.mark1;
cout <<"enter student's second mark: ";
cin >> st.mark2;
cout <<"enter student's third mark: ";
cin >> st.mark3;
cout <<"Summary " << endl;
cout <<"Student name: " << st.name << endl;
cout <<"Student's first mark: " << st.mark1 << endl;
cout <<"Student's second mark: " << st.mark1 << endl;
cout <<"Student's third mark: " << st.mark1 << endl;
system("pause");
return 0;
}
Comments
Leave a comment