English, asked by kaustubh8482, 10 months ago

Read two integers as input and swap them using call by reference, without using a third variable.by c++

Answers

Answered by pranavsai73
0

Answer:

#include <iostream>

using namespace std;

int main()

{

int a=5, b=10;

cout<<"Before swap a= "<<a<<" b= "<<b<<endl;

a=a*b; //a=50 (5*10)

b=a/b; //b=5 (50/10)

Explanation:

I HOPE YOU UNDERSTAND

I HOPE YOU UNDERSTAND MARK AS BRAINLEST

Similar questions