write a program to swap Two numbers without using temp variable.
Answer Posted / diponkor roy
#include<iostream>
using namespace std;
int main()
{
int x,y;
cin>>x;
cin>>y;
cout<<"You enter"<<x <<" and"<<y<<endl;
x=x*y;
y=x/y;
x=x/y;
cout<<"After swap your number "<<x <<" and"<<y<<endl;
return 0;
}
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
Why is extern used in c?
How do you define a string?
How to explain the final year project as a fresher please answer with sample project
Calculate 1*2*3*____*n using recursive function??
What will be the outcome of the following conditional statement if the value of variable s is 10?
How can I read and write comma-delimited text?
What is meant by gets in c?
How can you return multiple values from a function?
How a string is stored in c?
How can you determine the maximum value that a numeric variable can hold?
What the advantages of using Unions?
Explain which function in c can be used to append a string to another string?
When should we use pointers in a c program?
int main() { Int n=20,i; For(i=0;i<=n;i--) { Printf(“-“); Return 0;
What is an example of structure?