Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I'm Mister Satori

Name: !MhMRSATORI 2008-01-20 0:50

ITT: Give me a program, and I'll tell you if it terminates.

Name: Anonymous 2008-01-20 6:59

function searchForOddPerfectNumber()
     var int n = 1     // arbitrary-precision integer
     loop {
         var int sumOfFactors = 0
         for factor from 1 to n - 1 {
             if factor is a factor of n then
                 sumOfFactors = sumOfFactors + factor
         }
         if sumOfFactors = n then
             exit loop
         n = n + 2
     }
     return


>>3
Wtf is an ¡nt?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List