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


Please Help Members By Posting Answers For Below Questions

Write a program to print "hello world" without using a semicolon?

818


What are identifiers in c?

869


please send me the code for multiplying sparse matrix using c

1922


What is c mainly used for?

812


Which built-in library function can be used to match a patter from the string?

975


Explain what is the difference between a free-standing and a hosted environment?

882


What are the types of i/o functions?

954


How to get string length of given string in c?

792


Explain what will the preprocessor do for a program?

794


What are data types in c language?

788


What is array of structure in c programming?

991


Tell me what are bitwise shift operators?

868


What are structure members?

814


Explain the difference between malloc() and calloc() in c?

795


Explain which function in c can be used to append a string to another string?

823