ask the user to enter the year (can be 1,2,3,) &corce (HNDIT,HNDM,HNDA)
if year is 2&corece is HNDIT show him "it is time to garduate soon"
if year is 2&corece is HNDA show him "it is time to garduwate in 2 years "
if year is 3&corece is HNDM show him "it is time to garduwate soon "
if is 1 show him "you have more time in garduwate"
#include<iostream>
#include<string>
using namespace std;
int main(){
cout<<"Enter year\n";
int year;
cin>>year;
cout<<"Enter course\n";
string course;
cin>>course;
if(year==2 && course =="HNDIT"){
cout<<"It is time to graduate soon\n";
}
else if(year==2 && course=="HNDA"){
cout<<"It is time to graduate in 2 years\n";
}
else if(year==3 && course=="HNDM"){
cout<<"It is time to graduate soon\n";
}
else if(year==1){
cout<<"You have more time to graduate\n";
}
}
Comments
Leave a comment