write a program to swap Two numbers without using temp variable.
Answer Posted / venki
In vb script...............
a=inputbox ("Enter the first value:")
b=inputbox( "Enter the second value:")
msgbox "Before swap a= "&a&" b= "&b
a=cint(a)+cint(b)
b=cint(a)-cint(b)
a=cint(a)-cint(b)
msgbox "After swap a= "&a&" b= "&b
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
Tell us bitwise shift operators?
explain what is an endless loop?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
How do you use a 'Local Block'?
What is data types?
Explain what is a const pointer?
How do I get an accurate error status return from system on ms-dos?
What is the return type of sizeof?
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
When should you not use a type cast?
What is external variable in c?
Is null always equal to 0(zero)?
What is a class c rental property?
Explain the difference between structs and unions in c?