I accept user input as a floating point value.
This value may increase to "10 raised to a power of 18".
The next step involves finding all the divisors of this number. for which I do the following:
for(i=2; i<=n/2 ; i++)
{
if(n%i==0)
v.push_back(i);
}
Here n is the number entered by the user.
The problem is that n is a float and uses it if the loop index causes its value to be limited to '10 raised to power 9 '
Therefore, is there any way to use a data type other than int to use the values โโof the range '10 applied to power 18 '?
source
share