Programming in C++ Swapping two number without third variable

#include<iostream>
using namespace std;
int main()
{
int a,b;
cout<<"enter two numbers\n";
cin>>a;
b=a;
cin>>a;
cout<<"swap of two no. is\n"<<a<<b;
}

No comments:

Post a Comment

programme for armstrong number for 3 digit in java

armstrong number import java.util.Scanner; class Mittu {     public static void main(String []args)     {         Scanner s=new Sca...