POV-Ray : Newsgroups : povray.off-topic : Small math/programming problem : Small math/programming problem Server Time
13 Nov 2024 01:45:36 EST (-0500)
  Small math/programming problem  
From: Kevin Wampler
Date: 30 Jun 2010 20:38:10
Message: <4c2be372$1@news.povray.org>
I was going through some old stuff on my hard drive, and I came across a 
small code snippet which led to a cute little problem:

I have a number which is defined with the following bit of pseudocode, 
with all variables representing ideal mathematical integers:

n = 2
for(a = n; a > 0; a--)
   for(b = n; b > 0; b--)
     for(c = n; c > 0; c--)
       for(d = n; n > 0; d--)
         n++;
print n

What are the last 10 digits of the result printed by this program?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.