Answer to Question #187930 in C++ for Maaz

Question #187930

School Management System using file handling


1
Expert's answer
2021-05-04T14:14:16-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS