Ask your own question, for FREE!
Computer Science 16 Online
OpenStudy (ajprincess):

Plzz help. How to write a c++ program to find the maximum number from the given two numbers using swap function?

OpenStudy (ajprincess):

@eSpeX,@annas

OpenStudy (ajprincess):

@experimentX

OpenStudy (experimentx):

lol ... i don't know the c++ code why don't you use if else ..

OpenStudy (ajprincess):

bt the questions asks to use swap function only.

OpenStudy (experimentx):

http://www.cplusplus.com/reference/algorithm/swap/ it just a simple function that swaps content ... if a>b swap(a, b) end if echo "greatest is " b " smallest is "a

OpenStudy (ajprincess):

oops nt getting it right. :(

OpenStudy (experimentx):

Ahh i wish i knew cpp code ... i haven't done programming for more than a year ..

OpenStudy (ajprincess):

it's k. Thanxxxx a lot for trying to help me.

OpenStudy (experimentx):

lol does this help you http://codepad.org/9jl9b5ks

OpenStudy (ajprincess):

jst a moment checkng.

OpenStudy (experimentx):

try changing the values of x and y ... though i'm not sure what's the purpose of this ... finding bigger number is basic algorithm that you do with "Hello world" still try asking others ... and also google .. i don't think it's here ... http://www.mybestnotes.co.in/source-code/

OpenStudy (experimentx):

gotta sleep 2.45 am good night!!

OpenStudy (ajprincess):

gud night.biggg thannnnxxxxx. it works nw.

OpenStudy (experimentx):

yw

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!