Answer to Question #101700 in C++ for kiros

Question #101700
Swap the contents of two variables using a third variable.
1
Expert's answer
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS