lundi 3 octobre 2022

Finding number given the product [closed]

. Read in an integer r. If it is prime, print a message saying so. If it is not prime, find integers p ≤ q so that r = p · q and so that p and q are as close together as possible. For instance, for r = 30 you should print out 5,6, rather than 3,10. You are allowed to use the function sqrt. in c++.

Aucun commentaire:

Enregistrer un commentaire