Skip to content

25 done in c# #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions C#/25.1000 FIBONACCI NUMBER/RudaniNishant.CS
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Project Euler Problem No 25
int i = 0;
int cnt = 2;
BigInteger limit = BigInteger.Pow(10, 999);
BigInteger[] fib = new BigInteger[3];

fib[0] = 1;
fib[2] = 1;

while (fib[i] <= limit) {
i = (i + 1) % 3;
cnt++;
fib[i] = fib[(i + 1) % 3] + fib[(i + 2) % 3];
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Happy Contributing! 😃
| 22 | [Names scores](https://projecteuler.net/problem=22) | | | | :white_check_mark: | | | | | | | | |
| 23 | [Non-abundant sums](https://projecteuler.net/problem=23) | | | | | | | | | | | | |
| 24 | [Lexicographic permutations](https://projecteuler.net/problem=24) | | | | | | | | | | | | |
| 25 | [1000-digit Fibonacci number](https://projecteuler.net/problem=25) | | | | :white_check_mark: | | | | | | | | |
| 25 | [1000-digit Fibonacci number](https://projecteuler.net/problem=25) | | | | :white_check_mark: | | | | :white_check_mark: | | | | |
| 26 | [Reciprocal cycles](https://projecteuler.net/problem=26) | | | | | | | | | | | | |
| 27 | [Quadratic primes](https://projecteuler.net/problem=27) | | :white_check_mark: | | | | | | | | | | |
| 28 | [Number spiral diagonals](https://projecteuler.net/problem=28) | :white_check_mark: | :white_check_mark: | | :white_check_mark: | | | :white_check_mark: | | | | | |
Expand Down