Create SumOfFibonacciSeries.java#37
Conversation
khagapati-bagh
left a comment
There was a problem hiding this comment.
Hi @Ravitejavelamuri
Thank you for your contribution.
Please follow the contribution guide
Use the code formatter.
Hi, updated my code according to the contribution guidelines.
|
Hi @khagapati-bagh i edited my code, please review |
khagapati-bagh
left a comment
There was a problem hiding this comment.
Here are some comments for you
| @@ -3,43 +3,41 @@ | |||
| Description : This code finds even sum of fibonacci series till number n | |||
There was a problem hiding this comment.
Intend it properly
e.g:
/*
Author:
Date:
Description:
*/
There was a problem hiding this comment.
Hi I again edited, please have a look
| // Computing the value of first fibonacci series | ||
| // and storing the sum of even indexed numbers | ||
| static int Fib_Even_Sum(int N) { | ||
| if (N <= 0) |
There was a problem hiding this comment.
add a block for every if/for/while loop, even if it contains a single line.
| fib[j] = fib[j - 1] + fib[j - 2]; | ||
|
|
||
| // Only considering even indexes | ||
| if (j % 2 == 0) |
khagapati-bagh
left a comment
There was a problem hiding this comment.
Your code is fine. Just check my comments.
| // Only considering even indexes | ||
| if (j % 2 == 0) { | ||
| s += fib[j]; | ||
| } |
There was a problem hiding this comment.
check the indentation for the if block
| @@ -0,0 +1,45 @@ | |||
| /*Author: Raviteja | |||
There was a problem hiding this comment.
move the Autho to next line like
/*
Author:
Date:
Description:
*/
khagapati-bagh
left a comment
There was a problem hiding this comment.
Hi @Ravitejavelamuri Please check the comments.
| // Only considering even indexes | ||
| if (j % 2 == 0) { | ||
| s += fib[j]; | ||
| if (j % 2 == 0) { |
There was a problem hiding this comment.
Check this indentaion. Use the code formatter mentioned in the contribution guidelines.
No description provided.