write a program to swap Two numbers without using temp variable.
Answer Posted / vigneswari
#include<iostream.h>
#include<conio.h>
void main()
{
int a,b,c,d;
cout<<"\n enter a:";
cin>>a;
cout<<"\n enter b:";
cin>>b;
c=a+b;
d=a-b;
c=a-b;
cout<<"\n answer a :"<<c;
cout<<"\n answer b:"<<d;
getch();
}
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is using exit() the same as using return?
Is c easy to learn?
please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics
What is the value of c?
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is the difference between array_name and &array_name?
Hi can anyone tell what is a start up code?
Which is more efficient, a switch statement or an if else chain?
Explain what does it mean when a pointer is used in an if statement?
Why clrscr is used in c?
Why c is known as a mother language?
How can I convert a number to a string?
What is a header file?
Why c is called object oriented language?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250