Write a program to swap value of two variables without using third variable
5 3 | 3 |
sample program:
#include <iostream> using namespace std; int main() { int a,b; cin>>a>>b; a=a+b; b=a-b; a=a-b; cout<<a<<" "<<b; return 0; }Tags C++ languages
Subscribe Our Newsletter
0 Comment
Post a Comment