Say n = 10^6 then b = 10^12
can b hold 10^12 if you have given the data type “int” to b ?
Find out the ranges of int, float, long in java and find out what happens if you assign a number of its range will it crash or some other procedure takes place?
Also format your post by read this: [Tutorial] CoLoR format the Code!