Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- cout << "Enter a two characters (one letter and one number): ";
- char major;
- int year;
- cin >> major;
- string major_in, major_out;
- string year_in, year_out;
- string a = "freshman";
- string b = "sophomore";
- string c = "junior";
- string d = "senior";
- string M = "Mathematics";
- string C = "Computer Science";
- string I = "Information Technology";
- if (major_in == "M") major_out == M;
- else if (major_in == "C") major_out == C;
- else if (major_in == "I") major_out == I;
- if (year_in == "1") year_out == a;
- else if (year_in == "2") year_out == b;
- else if (year_in == "3") year_out == c;
- else if (year_in == "4") year_out == d;
- cout << major_out << endl;
- return 0;
- }
- cout<<major_out ” “ year_out<< endl
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement