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
What is the difference between int main and void main?
What is new line escape sequence?
What are two dimensional arrays alternatively called as?
What is the difference between text files and binary files?
Are bit fields portable?
What is the scope of local variable in c?
What is function prototype in c with example?
what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555
What are shell structures used for?
What does printf does?
What is pragma in c?
What will be your course of action for a push operation?
Why do we need functions in c?
What is the purpose of ftell?
Write a code to generate divisors of an integer?