Computer Science, asked by nithinkumar6662643, 11 months ago

write a program to read any two values. swap them and show the output. ​

Answers

Answered by Sneha110061
0

Hey mate...

Here is your answer..

Output Will be the following..

Enter the value of a ÷ 2

Enter the value of b ÷ 3

Before swapping

The value of a ÷ 2

The value of b ÷ 3

After swapping

The value of a ÷ 3

The value of b ÷ 2

Attachments:
Answered by aditimoulik2001
0

Easy

Explanation:

#include<stdio.h>

#include<iostream.h>

void main(void)

{

int a,b,t;

cout<<" Enter a and b which are to be swapped :";

cin>>a>>b;

t=a;

a=b;

b=t;

cout<<"\nAfter swapping, a and b are "<<a<<"\t"<<b<<" respectively";

return;

}

Don’t hesitate to consult for doubt in the comments below and Don't forget to mark it the brainliest if it helps.. #BAL #answerwithquality

Similar questions