Sunday, 12 July 2015

soution of 1st question

#include<iostream.h>
#include<conio.h>
using namespace std;
int main()
{
    int a=1,b=1,c=1;
    cout<<"Enter number 'a' ";
    cin>>a;
    cout<<"Enter number 'b' ";
    cin>>b;
    /* Swap the value of a to b and b to a */
    c=a;
    a=b;
    b=c;
    cout<<"After swaping a = "<<a<<"\n";
    cout<<"After swaping b = "<<b;
    getch();
}

No comments:

Post a Comment