Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am Currently trying to write some code in VBA to solve a problem from Project Euler. I have been trying to answer a question that requires you to find primes that can be divided into a number that will not fit in a long. Any suggestions as how to handle this problem?

I know I can split the number between two variables and I have done that for addition and subtraction but never division. Any help will be appreciated.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
777 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can define a Decimal data type (12 Bytes), but only within a variant.

Dim i As Variant

i = CDec(i)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...