write a program to read any two values. swap them and show the output.
Answers
Answered by
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
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
Physics,
5 months ago
Biology,
5 months ago
History,
5 months ago
Psychology,
11 months ago
Math,
11 months ago
CBSE BOARD XII,
1 year ago
Math,
1 year ago