Algorithm which just sums up for no apparent reason 𝑝𝑟𝑜𝑐𝑒𝑑𝑢𝑟𝑒𝑆𝑜𝑚𝑒𝐴𝑙𝑔3(𝑛) 𝑠𝑢𝑚 = 0 𝑓𝑜𝑟 𝑖 = 1 𝑡𝑜 √𝑛 𝑑𝑜 𝑠𝑢𝑚 = 𝑠𝑢𝑚 + 𝑖 𝑒𝑛𝑑 𝑓𝑜𝑟 𝑓𝑜𝑟 𝑖 = 1 𝑡𝑜 √𝑛 𝑑𝑜 2 𝑠𝑢𝑚 = 𝑠𝑢𝑚 + 𝑖 𝑒𝑛𝑑 𝑓𝑜𝑟 𝑓𝑜𝑟 𝑖 = 1 𝑡𝑜 10 𝑑𝑜 𝑠𝑢𝑚 = 𝑠𝑢𝑚 + 𝑖 𝑒𝑛𝑑 𝑓𝑜𝑟 𝑒𝑛𝑑 𝑝𝑟𝑜𝑐𝑒𝑑𝑢𝑟𝑒 Algorithm which just sums up for no apparent reason 𝑝𝑟𝑜𝑐𝑒𝑑𝑢𝑟𝑒𝑆𝑜𝑚𝑒𝐴𝑙𝑔4(𝑛) 𝑠𝑢𝑚 = 0 𝑓𝑜𝑟 𝑖 = 1 𝑡𝑜 √𝑛 𝑑𝑜 𝑓𝑜𝑟 𝑗 = 1 𝑡𝑜 5 𝑑𝑜 𝑠𝑢𝑚 = 𝑠𝑢𝑚 + 𝑖 ∗ 𝑗 𝑒𝑛𝑑 𝑓𝑜𝑟 𝑒𝑛𝑑 𝑓𝑜𝑟 𝑒𝑛𝑑 𝑝𝑟𝑜𝑐𝑒𝑑𝑢𝑟𝑒
n
procedureSomeAlg3
1
sqrt(n)
procedureSomeAlg4
5
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)