Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Wt are the Buses in C Language

3213


What is a ternary operator in c?

1119


What is meant by gets in c?

1177


What is difference between main and void main?

1203


What are c identifiers?

1087


What is declaration and definition in c?

1085


What is null pointer constant?

1149


Why #include is used in c language?

1046


Can you please explain the difference between malloc() and calloc() function?

1118


What is the significance of c program algorithms?

1142


Can we declare variable anywhere in c?

966


Why use int main instead of void main?

1116


Can include files be nested?

1102


What are terms in math?

1044


What is the use of getchar() function?

1125