/*************************************************************************
> File Name: ex9.16.cpp
> Author:
> Mail:
> Created Time: Mon 26 Feb 2024 07:36:22 PM CST
************************************************************************/
#include
#include
#include
using namespace std;
int main(){
vector<int> number;
list<int> lst;
int num;
cout<<"Enter vector numbers: ";
while(cin>>num){
number.push_back(num);
if(cin.get() == '\n'){
break;
}
}
cout<<"Enter list numbers: ";
while(cin>>num){
lst.push_back(num);
if(cin.get() == '\n'){
break;
}
}
cout<<"Vector numbers: ";
for(const auto n : number){
cout<<n<<" ";
}
cout<<endl;
cout<<"List numbers: ";
for(const auto l : lst){
cout<<l<<" ";
}
cout<<endl;
list<int>::iterator li = lst.begin();
int val = number[0];
if(*li > val){
cout<<*li<<" > "<<val<<endl;
}
else if(*li < val){
cout<<*li<<" < "<<val<<endl;
}
else{
cout<<*li<<" == "<<val<<endl;
}
return 0;
}