School Management System using file handling
#include<iostream>
using namespace std;
int main(){
int i;
cout<<"you are welcome in XYZ college"<<endl;
cout<<"Available courses:"<<endl;
cout<<"1. Maths"<<endl;
cout<<"2. Science"<<endl;
cout<<"3. Physics"<<endl;
cout<<"4. Biology"<<endl;
cout<<"5. Computer Science"<<endl;
cout<<"6. Civil Engineering"<<endl;
cout<<"7. Sociology"<<endl;
cout<<"Enter the course number"<<endl;
cin>>i;
switch(i){
case 1:
cout<<"You have selected Maths"<<endl;
break;
case 2:
cout<<"You have selected Science"<<endl;
break;
case 3:
cout<<"You have selected Physics"<<endl;
break;
case 4:
cout<<"You have selected Biology"<<endl;
break;
case 5:
cout<<"You have selected Computer Science"<<endl;
break;
case 6:
cout<<"You have selected Civil Engineering"<<endl;
break;
case 7:
cout<<"You have selected Sociology"<<endl;
break;
default:
cout<<"Entered option is not available"<<endl;
break;
}
return 0;
}
Comments
Leave a comment