#include
#include
using namespace std;
struct student
{
int roll;
int age;
int marks;
string name;
};
int main()
{
student st;
student st2;
student st3;
student st4;
student st5;
cout << "Enter the name of the student 1:" << endl;
getline(cin, st.name);
cout << "Enter the roll # of the student 1:" << endl;
cin >> st.roll;
cout << "Enter the age of the student 1:" << endl;
cin >> st.age;
cout << "Enter the marks of the student 1:" << endl;
cin >> st.marks;
cin.ignore();
cout<> st2.roll;
cout << "Enter the age of the student 2:" << endl;
cin >> st2.age;
cout << "Enter the marks of the student 2:" << endl;
cin >> st2.marks;
cin.ignore();
cout<> st3.roll;
cout << "Enter the age of the student 3:" << endl;
cin >> st3.age;
cout << "Enter the marks of the student 3:" << endl;
cin >> st3.marks;
cin.ignore();
cout<> st4.roll;
cout << "Enter the age of the student 4:" << endl;
cin >> st4.age;
cout << "Enter the marks of the student 4:" << endl;
cin >> st4.marks;
cin.ignore();
cout<> st5.roll;
cout << "Enter the age of the student 5:" << endl;
cin >> st5.age;
cout << "Enter the marks of the student 5:" << endl;
cin >> st5.marks;
cout << "_______________________________________" << endl;
cout << "The name of the student 2 = " << st2.name << endl;
cout << "The roll # of the student 2 = " << st2.roll << endl;
cout << "The age of the student 2 = " << st2.age << endl;
cout << "The marks of the student 2 = " << st2.marks << endl;
return 0;
}
#include
#include
using namespace std;
struct student
{
string name;
string roll;
int session;
int id;
};
int main()
{
student st[3];
st[0].name = "Muhib";
st[1].name = "Ali";
st[2].name = "Hamza";
st[0].roll = "BSEF21M540";
st[1].roll = "BSEF21M541";
st[2].roll = "BSEF21M543";
st[0].session = 2021;
st[1].session = 2021;
st[2].session = 2021;
st[0].id = 1;
st[1].id = 2;
st[2].id = 3;
int n;
cout << "Enter the id of the student that you want to know:" << endl;
cin >> n;
for (int i = 0; i < 3; i++)
{
if (st[i].id == n)
{
cout << "____________________________________" << endl;
cout << "The name of the student " << i + 1 << " =" << st[i].name << endl;
cout << "The roll # of the student " << i + 1 << " =" << st[i].roll << endl;
cout << "The session of the student " << i + 1 << " =" << st[i].session << endl;
cout << "The id of the student " << i + 1 << " =" << st[i].id << endl;
}
}
return 0;
}
#include
using namespace std;
struct ra{
string hi;
};
struct date{
int min;
int hr;
int sec;
ra gg;
};
struct student{
string name;
int roll;
int sem;
float cgpa;
date dob;
};
int main(){
student st1;
cout<<"Enter the name of the student:"<>st1.roll;
cout<<"Enter the semister of the student:"<>st1.sem;
cout<<"Enter the cpga of the stusent:"<>st1.cgpa;
cout<<"Enter the hours:"<>st1.dob.hr;
cout<<"Enter the minutes:"<>st1.dob.min;
cout<<"Enter the seconds:"<>st1.dob.sec;
cout<<"say hi"<>st1.dob.gg.hi;
cout<<"____________________________________________________________"<
#include
#include
using namespace std;
struct address
{
string country;
string division;
string district;
string city;
string postelAddress;
};
struct data
{
char name[25];
int age;
string rollNo;
char gender[15];
int hostel_no;
int room_no;
char department[100];
int semister;
address addr;
};
int main()
{
data st[4];
string n;
for (int i = 0; i < 4; i++)
{
cout << "Enter the name of the student no " << i + 1 << " :" << endl;
cin.getline(st[i].name, 25);
cout << "Enter the roll number of the student no " << i + 1 << " :" << endl;
getline(cin, st[i].rollNo);
cout << "Enter the gender of the student no " << i + 1 << " :" << endl;
cin.getline(st[i].gender, 15);
cout << "Enter the age of the student no " << i + 1 << " :" << endl;
cin >> st[i].age;
cin.ignore();
cout << "Enter the department of the student no " << i + 1 << " :" << endl;
cin.getline(st[i].department, 100);
cout << "Enter the semister of the student no " << i + 1 << " :" << endl;
cin >> st[i].semister;
cout << "Enter hostel number of the student no " << i + 1 << " :" << endl;
cin >> st[i].hostel_no;
cout << "Enter the room number of the student no " << i + 1 << " :" << endl;
cin >> st[i].room_no;
cin.ignore();
cout << "Enter the address as:" << endl;
cout << "Enter the country:";
getline(cin, st[i].addr.country);
cout << "Enter the division:";
getline(cin, st[i].addr.division);
cout << "Enter the district:";
getline(cin, st[i].addr.district);
cout << "Enter the city:";
getline(cin, st[i].addr.city);
cout << "Enter the postel Address:";
getline(cin, st[i].addr.postelAddress);
}
cout<
Whats make this website differents from others?
Amazing Feature That Increase your Productivity
If you don't find any problem,in this website and if you have a very difficult assignment
question that
is not present on internet ,then you dont bother yourself,we are here to solve every problem
of
your
life you just click on the Problem asking button and write your problem we slove the code of
your
problem and sent you on your email addres that you put in the sin up form.