Multiplication of Prime numbers | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Multiplication of Prime numbers

Create a program which can list out all the pairs of Prime numbers within a range that when multiplied gives a number whose summation of digits results in one of the parent prime number. Suppose 3*7 = 21(2+1 =3), so 3 - TRUE - matches one of the number 13*3 = 39 (3+9 = 12; 1+2 =3) - TRUE - program first check if number 12 is present and if not then it adds 1+2 and checks if this matches. 7*11 = 77 (7+7 = 14; 1+4 = 5) - FALSE - Both ways none of the numbers match Target is to List out all such pairs within range 100. You can use any programming Language.

5th Feb 2018, 11:37 AM
Amit Kumar
Amit Kumar - avatar
3 Answers
5th Feb 2018, 1:16 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar
+ 1
So we have to list all binary pairs (a,b) which satisfy the above condition? And print all such pairs in which a && b are < 100?
5th Feb 2018, 12:36 PM
Kinshuk Vasisht
Kinshuk Vasisht - avatar