---
title: "Discussion on \"Project Euler - Problem 2\" | Hashnode"
description: "Discussion on \"Project Euler - Problem 2\". ' https://projecteuler.net/problem=2\n\nsub main()\n\n    n = 1\n    fibn = fib(n)\n    sum = 0\n\n    while fibn < 4000000\n        if ( fibn mod 2 ) = 0\n            sum = sum + fibn\n        end if\n        n = n + 1\n        fibn = fib(n)\n    end while\n\n    p..."
url: "https://hashnode.com/posts/project-euler-problem-2/647016d00016a602b55d7db7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Project Euler - Problem 2](https://blog.brightscripters.com/project-euler-problem-2?utm_source=hashnode&utm_medium=feed)

' https://projecteuler.net/problem=2 sub main() n = 1 fibn = fib(n) sum = 0 while fibn < 4000000 if ( fibn mod 2 ) = 0 sum = sum + fibn end if n = n + 1 fibn = fib(n) end while p...

May 26, 2023 · 1 min read · blog.brightscripters.com  
Read the article

-   [#brightscript](https://hashnode.com/tag/brightscript)

## Written by

[Bright Scripters](https://hashnode.com/@BrightScripters)

@BrightScripters · USA

  
[View profile](https://hashnode.com/@BrightScripters)

Taking BrightSign programming to the next level

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
