locked
how to divide array in two group RRS feed

  • Question

  • if i write mn in prime factors

    ex. 35 = 5*7

    114=2*3*19

    45=3*3*5 but if prime number are same i will write 45 in 45 =9*5

    ex.135=27*5

    180180=4*9*5*7*11*13

    and then if i want to separate them in 2 groups such that (4*9 , 5*7*11*13) or (4*7*13 ,5*9*11)

    i want to divide array in two group without condition

    how can i know all of case about this and show all of them 

    i want to know only case of m

    in my program i input 4,9,5,7,11,13 and then it will output like that 

    please,

    thank you .

    Wednesday, July 27, 2016 2:40 PM

All replies

  • Hello,

     What is it exactly that you want your app to do with Prime numbers? By the way, 4 and 9

    are not Prime.  Please give more details about your apps purpose.  FYI, the definition of

    Prime Numbers is a number than can only be divided by and 1 and its self.

    Thanks :)

    Wednesday, July 27, 2016 3:33 PM
  • if i write mn in prime factors

    ex. 35 = 5*7

    114=2*3*19

    45=3*3*5 but if prime number are same i will write 45 in 45 =9*5

    ex.135=27*5

    180180=4*9*5*7*11*13

    and then if i want to separate them in 2 groups such that (4*9 , 5*7*11*13) or (4*7*13 ,5*9*11)

    i want to divide array in two group without condition

    how can i know all of case about this and show all of them

    What do you mean by these last two lines exactly?

    In future, please do not post using images. Copy and paste from the source and output windows.


    David Wilkinson | Visual C++ MVP

    Wednesday, July 27, 2016 4:10 PM