- #1
needOfHelpCMath
- 72
- 0
If “tomato” get entered first and “potato” get input afterward, what will the output be?
Code:
string input1;
string input2;
cin>>input1;
cin>>input2;
if (input1 < input2) {
cout<<input1<<endl;
cout<<input2<<endl;
}
else {
cout<<input2<<endl;
cout<<input1<<endl;
}
Last edited: