Elakiri Programmers...

hasiwebmail

Member
Feb 27, 2007
501
52
0
Sri Lanka
Write a C++ program to generate all the possible permutations of a given number.

Ex:
input : 123

output
123
312
231
213
321
132

Meka puluwanda?? Coding ona...

:confused::confused::confused::confused::confused:
 

KishanW

Member
Apr 12, 2007
9,629
24
0
USA
Why dont you ask for the logic of the program, try to do it your self and then ask anyone here to debug your program and help you out?
 

Muthumina

Member
Feb 13, 2008
271
9
0
25 min from colombo
Why dont you ask for the logic of the program, try to do it your self and then ask anyone here to debug your program and help you out?
agreed big time

@thread stater
you may think that getting by somebody else to write your code you are doing a smart thing
But at the end you are the one losing.

If I write an answer here you'll just copy this from here to your answer.
And learn absolutely nothing

At any rate thinking you're understanding code written by some other is much easier than actually writing some.
break the question into parts and think of how you can do it

for example
you need to take the digits apart first
how can you do that?
then rearrange them and print
then rearrange them and print
then rearrange them and print
the permutations in an orderly manner so that none are missed

try to solve before asking for help

people normally post their program and then ask "what is wrong with this"
 

nagaya

Member
Mar 18, 2007
12,671
194
0
hey man write the algorithm for urself and code that,no one will write alogs for u n u can code that
 

mcj1983

Well-known member
  • Oct 15, 2007
    4,876
    180
    63
    Gampaha
    මල්ලි තනියම හිතල ලියන්න පුරුදු වෙන්න නැත්තම් ජොබ් එකකට ගිය කාලෙකට තම සොරි වෙන්නෙ......දැන් වැරදුනම හදගන්න පුලුවන් ඒත් ජොබ් එකකට ගිහින් වැරදුනාම අපිට අනුකම්ප කරන්න කවුරුත් නෑ.....අනිත්දේ තම ගුගල් දෙයියව හරියට යුස් කලොත් ඔක හොයගන්න පුලුවන් වෙයි (එක තනියම කරන තරම් හොද වඩක් නෙමේ )....මොකද අපිට එන ප්‍රශ්න වලින් 95%කටත් වැඩිය ප්‍රමණයක් මේ ලෝකෙ තව කාට හරි අනිවර්යෙන්ම අපිට කලින් ඇවිත් තියනවා....
     

    Muthumina

    Member
    Feb 13, 2008
    271
    9
    0
    25 min from colombo
    Gettata anukampa kala menawi... :sorry::sorry:

    Google wala meka hoyaganna be, Tiyana ewat lagin wat yanne ne.
    Mata ehema hari kamak ne Hoyala dennawada?




    :shocked::shocked::shocked::shocked:

    anukampa karala thamai bung kiyanne oka thaniyama karapan kiyala
    Anukampawa labannath umba karanna ona hariyak thiyanawa eka karapan

    higannek unath macho bus ekakat nagala hari paarak ainakata awilla hingakanne
    Uth poddak mahansi wenawa
    U gedarata wela hitiyoth minissu gedarata salli deela yanne nane

    mama umba karanna ona de kiayannada?
    go back to basics

    most complex stuff are just combinations of basics

    issellama integer ekak print wena program ekak liyapan
    eka karanna puluwanda?
    barinam issellama eka igenaganin

    eeta passe digits deka thunak aragena(integers washyen) ewaye eka eka piliwelata print wenna liyapan
    eka karanna puluwanda?
    barinam eetapsee eka igenaganin

    arrays handle kara ganna puluwanda
    ehema nathinam umbata strings handle karaganna puluwanda
    strings kapala kotala charactors ganna hati ehema hoyala balanna

    mehemai malli
    Oya wage podi podi program dahayak withara liyanakota wade karanna ona hati umbatama nikamma therei

    ehema liyala waradunoth post karala balanna

    umbata ohoma podi programs 10k liyanna kammalinam umbata issarahata saaaahenna amaru wenawa.
    mokada dan umba smart guy wenna athaarapuwa godak job ekak karaddi umbata saaahenna time constraints ekkama igena ganna wenawa
    poddak mahansiwela oka liyapan.
     

    Muthumina

    Member
    Feb 13, 2008
    271
    9
    0
    25 min from colombo
    Hapoo chaater

    umbanam maha amuma amu kammaliyek ban

    google karalath meka kittuwenwath yana ekak hoya ganna baha kiyala neda kiwwe

    Muu google karalath nadda koheda
    mama nikam google karala baluwa kohomada bole mehema program ekak nathiune kiyala
    Results 1 - 10 of about 1,180,000 for ...

    mama click karapu link deka thunema gedi pitin c++ program thibuna
    Issella copy karanna igenaganin
     
    • Like
    Reactions: kitt354