将两个数字作为输入并交换它们并打印交换的值。您不需要打印任何东西,它已经被处理好了。只需实现给定的功能。功能看起来像这样。
pair < int, int > swap(pair < int, int > swapValues) {
int c;
c=swapValues.first;
swapValues.first=swapValues.second;
swapValues.second=c;
cout<<swapValues.first<<" "<<swapValues.second<<"\n";
}