Computer Science, asked by cherry9017, 11 months ago

a simple computer program to swap two numbers by using the third number

Answers

Answered by Anonymous
1
hi cherry commment in my answer

cherry9017: hi
Answered by TheTotalDreamer
1
Hey,

#include <stdio.h>  

int main()

{ int x, y, temp;

  cout<<("Enter the value of x and y\n");

cin>>("%d%d", &x, &y);  

cout<<("Before Swapping\nx = %d\ny = %d\n",x,y);  

temp = x;

x = y;

y = temp;  

cout<<("After Swapping\nx = %d\ny = %d\n",x,y);  

return 0;

}

HOPE IT HELPS:-))
Similar questions