Answer to Question #101700 in C++ for kiros
Swap the contents of two variables using a third variable.
1
2020-01-24T06:32:35-0500
#include <iostream>
using namespace std;
int main()
{
int a,b,temp;
cin>>a>>b;
temp=a;
a=b;
b=temp;
cout<<a<<" "<<b;
return 0;
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment