+ 1

#1. Program a code in cpp by which you can find whether a no.(input) can divided into 2even numbers or not

17th Oct 2017, 3:38 AM
aka
3 odpowiedzi
+ 9
your question doesn't clarify how you want to divide the sum 1. In such a way that sum of both is the number you input In this case every even number can be converted into sum of other two different (or same) even numbers and there is more than 1 solutions for this way (except 2 it has only 1 solution 2=2+0) 2.In such a way that their product is the number you input In this case every multiple of 4 can be converted into product of two even numbers. just check for the divisibility by 4 if yes otherwise not. explanation: let n be the number divisible by 4 n=4*k =(2)*(2*k) irrespective of the value of k it can be converted in the required form. here also more than 1 solution exist depending upon the primerity of k(single solution if k is prime)
17th Oct 2017, 8:06 AM
Nikhil Dhama
Nikhil Dhama - avatar
+ 9
then case 1 is your answer
23rd Oct 2017, 1:56 PM
Nikhil Dhama
Nikhil Dhama - avatar
0
for eg. 6 can be divided into 2even no. 4+2
23rd Oct 2017, 1:48 PM
aka