Description:
In c++, to take inputs from user 'cin' operator is used and to show output 'cout' operator is used.
Code:
In c++, to take inputs from user 'cin' operator is used and to show output 'cout' operator is used.
Code:
#include<iostream>
#include<conio.h>
#include<iomanip>
using namespace std;
int main()
{
int a,b,c;
cout<<"Enter value of A"<<endl;
cin>>a;
cout<<endl;
cout<<"Enter value of B"<<endl;
cin>>b;
c=a;
a=b;
b=c;
cout<<"interchanged values are"<<endl;
cout<<a<<endl<<b<<endl<<"ok";
getche();
return 0;
}
No comments:
Post a Comment