Professional Documents
Culture Documents
#include <cmath>
#include <string>
#include <iomanip>
class Student
{
string name;
string f_name;
int Roll_No;
string Degree;
string Department;
public:
void input_data()
{
cin.ignore();
cout << endl;
cout << "Enter the name of Student:" << endl;
getline(cin, name);
cout << "Enter Father name of Student:" << endl;
getline(cin, f_name);
cout << "Enter Department of Student:" << endl;
getline(cin, Department);
cout << "Enter Degree of Student:" << endl;
getline(cin, Degree);
cout << "Enter the Roll Number of Student:" << endl;
cin >> Roll_No;
}
void display_all()
{
cout << "Name of Student is: " << name << endl;
cout << "The Father name of Student is: " << f_name << endl;
cout << "Roll number of student is : " << Roll_No << endl;
cout << "Department of Student is: " << Department << endl;
cout << "Degree of Student is: " << Degree << endl;
cout << endl;
cout << "-----------------" << endl;
}
if (Roll_No == roll1)
{
cout << "Name of Student is: " << name << endl;
cout << "The Father name of Student is: " << f_name << endl;
cout << "Roll number of student is : " << Roll_No << endl;
cout << "Department of Student is: " << Department << endl;
cout << "Degree of Student is: " << Degree << endl;
cout << endl;
cout << "-----------------" << endl;
}
}
void delete_data()
{
int roll;
cout << "please enter the Roll number of user to delete its data:" << endl;
cin >> roll;
int main()
{
int n;
Student E[2];
else if (n == 3)
{
int roll;
cout << "please enter the Roll number of Student to find its detail:"
<< endl;
cin >> roll;
for (int i = 0; i < 2; i++)
{
E[i].search(roll);
}
}
else if (n == 4)
{
for (int i = 0; i < 2; i++)
{
E[i].delete_data();
}
}
continue;
}
return 0;
}