Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include "database.h"
using namespace std;
int main(){
int Lect_id,stu_id;
string Lect_name,name,class1,b;
cout<< "enter lecturer name"<<endl;
cin>>Lect_name;
Lect_id: cout<< "enter lecturer id"<<endl;
Lect_id=0;
cin>>Lect_id;
if (Lect_id>9999999){
cout<<"Enter valid Lecturer ID"<<endl;
goto Lect_id;
}
else{
cout<<"Lecturer ID accepted"<<endl;
UploadLecturer(Lect_id, Lect_name);
}
lect:cout<<"Do you want have a look at the lecturers' list? (y/n)"<<endl;
cin>>b;
if (b=="y" || b== "Y"){
printLecturers();
}
else if (b=="n" || b=="N"){
cout<< "okay"<<endl;
cout<< "enter student name"<<endl;
cin>>name;
cout<< "enter student id"<<endl;
cin>>stu_id;
cout<< "enter class code"<<endl;
cin>> class1;
UploadStudent(stu_id, name, class1);
printStudents();
}
else{
cout<< "enter a valid input"<<endl;
goto lect;
}
return 1;
// I tried writing in more code, but it isnt working perfectly
}