#include<iostream.h>
#include<conio.h>
void main()
{
int a = 5, b = 8;
cout<<"A = "<<a<<"\nB = "<<b;
int temp = a;
a = b;
b = temp;
cout<<"\nSwapped values: ";
cout<<"\nA = "<<a<<"\nB = "<<b;
}
On Sun, Sep 22, 2019, 1:16 PM Krupa Sivakumaran <krupa32@xxxxxxxxx> wrote:
Yes. Whoever knows the solution can post it.
Thats what the group is for.
Make some noise.
On 9/20/19, Krupa Sivakumaran <krupa32@xxxxxxxxx> wrote:
Here is the first programming question to the group.
Given two numbers a and b with values 5 and 8, write a program to swap
the values of
a and b, and print them. That is, a should be 8 and b should be 5
after the swap.