#include<iostream>
#include<fstream>
using namespace std;
struct shan
{
int MISID;
char name[40];
char father_name[40];
char department[40];
char registration[30];
char title_of_degree[30];
char semester[5];
char shift[10];
char sub1[10];
char sub1_code[10];
int sub1_credit_hours;
int sub1_marks;
int sub1_obt_marks;
char sub2[10];
char sub2_code[10];
int sub2_credit_hours;
int sub2_marks;
int sub2_obt_marks;
char sub3[10];
char sub3_code[10];
int sub3_credit_hours;
int sub3_marks;
int sub3_obt_marks;
char sub4[10];
char sub4_code[10];
int sub4_credit_hours;
int sub4_marks;
int sub4_obt_marks;
char sub5[10];
char sub5_code[10];
int sub5_credit_hours;
int sub5_marks;
int sub5_obt_marks;
char sub6[10];
char sub6_code[10];
int sub6_credit_hours;
int sub6_marks;
int sub6_obt_marks;
};
main()
{
shan st;
int marks;
char n;
ofstream zeeshan;
zeeshan.open("zee.txt");
cout<<"student registration data form."<<endl<<endl;
zeeshan<<"student registration data form."<<endl<<endl;
for(int i=0;i<=10;i++)
{
cout<<"record:"<<endl<<endl;
zeeshan<<"record:"<<endl<<endl;
cout<<"student MISID:\t"<<endl;
cin>>st.MISID;
zeeshan<<"student MISID:\t"<<st.MISID<<endl;
cout<<"student name:\t"<<endl;
cin>>st.name;
zeeshan<<"student name:\t"<<st.name<<endl;
cout<<"student father name:\t"<<endl;
cin>>st.father_name;
zeeshan<<"student father name:\t"<<st.father_name<<endl;
cout<<"department:\t"<<endl;
cin>>st.department;
zeeshan<<"department:\t"<<st.department<<endl;
cout<<"registration:\t"<<endl;
cin>>st.registration;
zeeshan<<"registration:\t"<<st.registration<<endl;
cout<<"title of degree:\t"<<endl;
cin>>st.title_of_degree;
zeeshan<<"title of degree:\t"<<st.title_of_degree<<endl;
cout<<"semester:\t"<<endl;
cin>>st.semester;
zeeshan<<"semester:\t"<<st.semester<<endl;
cout<<"shift:\t"<<endl;
cin>>st.shift;
zeeshan<<"shift:\t"<<st.shift<<endl<<endl;
cout<<"subject 1:\t"<<endl;
cin>>st.sub1;
zeeshan<<"subject 1:\t"<<st.sub1<<endl;
cout<<"subject 1 code:\t"<<endl;
cin>>st.sub1_code;
zeeshan<<"subject 1 code:\t"<<st.sub1_code<<endl;
cout<<"subject 1 credit hours:\t"<<endl;
cin>>st.sub1_credit_hours;
zeeshan<<"subject 1 credit hours:\t"<<st.sub1_credit_hours<<endl;
cout<<"subject 1 marks:\t"<<endl;
cin>>st.sub1_marks;
zeeshan<<"subject 1 marks:\t"<<st.sub1_marks<<endl<<endl;
cout<<"subject 2:\t"<<endl;
cin>>st.sub2;
zeeshan<<"subject 2:\t"<<st.sub2<<endl;
cout<<"subject 2 code:\t"<<endl;
cin>>st.sub2_code;
zeeshan<<"subject 2 code:\t"<<st.sub2_code<<endl;
cout<<"subject 2 credit hours:\t"<<endl;
cin>>st.sub2_credit_hours;
zeeshan<<"subject 2 credit hours:\t"<<st.sub2_credit_hours<<endl;
cout<<"subject 2 marks:\t"<<endl;
cin>>st.sub2_marks;
zeeshan<<"subject 2 marks:\t"<<st.sub2_marks<<endl<<endl;
cout<<"subject 3:\t"<<endl;
cin>>st.sub3;
zeeshan<<"subject 3:\t"<<st.sub3<<endl;
cout<<"subject 3 code:\t"<<endl;
cin>>st.sub3_code;
zeeshan<<"subject 3 code:\t"<<st.sub3_code<<endl;
cout<<"subject 3 credit hours:\t"<<endl;
cin>>st.sub3_credit_hours;
zeeshan<<"subject 3 credit hours:\t"<<st.sub3_credit_hours<<endl;
cout<<"subject 3 marks:\t"<<endl;
cin>>st.sub3_marks;
zeeshan<<"subject 3 marks:\t"<<st.sub3_marks<<endl<<endl;
cout<<"subject 4:\t"<<endl;
cin>>st.sub4;
zeeshan<<"subject 4:\t"<<st.sub4<<endl;
cout<<"subject 4 code:\t"<<endl;
cin>>st.sub4_code;
zeeshan<<"subject 4 code:\t"<<st.sub4_code<<endl;
cout<<"subject 4 credit hours:\t"<<endl;
cin>>st.sub4_credit_hours;
zeeshan<<"subject 4 credit hours:\t"<<st.sub4_credit_hours<<endl;
cout<<"subject 4 marks:\t"<<endl;
cin>>st.sub4_marks;
zeeshan<<"subject 4 marks:\t"<<st.sub4_marks<<endl<<endl;
cout<<"subject 5:\t"<<endl;
cin>>st.sub5;
zeeshan<<"subject 5:\t"<<st.sub5<<endl;
cout<<"subject 5 code:\t"<<endl;
cin>>st.sub3_code;
zeeshan<<"subject 5 code:\t"<<st.sub5_code<<endl;
cout<<"subject 5 credit hours:\t"<<endl;
cin>>st.sub5_credit_hours;
zeeshan<<"subject 5 credit hours:\t"<<st.sub5_credit_hours<<endl;
cout<<"subject 5 marks:\t"<<endl;
cin>>st.sub5_marks;
zeeshan<<"subject 5 marks:\t"<<st.sub5_marks<<endl<<endl;
cout<<"subject 6:\t"<<endl;
cin>>st.sub6;
zeeshan<<"subject 6:\t"<<st.sub6<<endl;
cout<<"subject 6 code:\t"<<endl;
cin>>st.sub6_code;
zeeshan<<"subject 6 code:\t"<<st.sub6_code<<endl;
cout<<"subject 6 credit hours:\t"<<endl;
cin>>st.sub6_credit_hours;
zeeshan<<"subject 6 credit hours:\t"<<st.sub6_credit_hours<<endl;
cout<<"subject 6 marks:\t"<<endl;
cin>>st.sub6_marks;
zeeshan<<"subject 6 marks:\t"<<st.sub6_marks<<endl<<endl;
cout<<"if u want to save some more data type n for next."<<endl<<endl;
cin>>n;
if(n=='n'||n=='N')
{
cout<<"**********"<<endl;
}
else
{
cout<<"bye..!"<<endl;
break;
}
}
system("pause");
No comments:
Post a Comment