program to find the sum of fibonocci series upto n terms
C4fum brings the next level for finding the sum...
Hey friends, looking to find the
sum of series, and not able to go for logic?
No doubt it is a special kind of
series which trouble not only you but many, so you are lucky that are looking
to clear your doubt otherwise many are there who just leave the issue and move forward.
If you work hard today then for
sure you will be a good developer tomorrow so do get demotivated if you are
struck as it is life
Now taking about the topic we have
to find the sum of series so foot that what all things we would be requiring,
just think if the layout of the code you would be able to imagine the details
and thus if you Rae able to imagine the code running in screen that’s it you
would be able to do all task.
Think of the first step,
Then what should the [program
should perform next think of it.
The result what should happen with that?
Go in this manner and then you
would be able to make logic.
Be it any question or any doesn’t matter
a bit!
So try coding now if you have imagined
all the steps.
First go with yourself and try to
code ,if you want you can help of algorithm , but try doing the coding by
yourself and thus if you are struck then look for the source code provided
below .
sum of first n Fibonacci numbers.what is fibonacci series?
it is a series of numbers in which each number of the series is derived by the adding of its two previous numbers.
For seriws comes out to be: 0, 1, 1, 2, 3, 5, 8, . . . .
#include<stdio.h>
#include<conio.h>
void main()
{
int i,a=-1,b=1,s=0;
clrscr();
printf("enter the number of terms");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
c=a+b;
s=s+c;
a=b;
b=c;
}
printf("the sum of series is = %d",s);
getch();
}
check out the program to find out the Sum .
and comment the the number of terms you used and the sm you obtained
lets try finding out the sum now....
When you have done coding and
testing now it’s time to share the result you have obtained from the program
Comment down the result you aver
obtained while running your code?
Was the result as expected by you
if not what was the error?
Share your vies was the program
really difficult after you have used the source code?
Share this program among your
friends whom you think it would help them as when you build the simple program
then you build and boost up your confidence so do share the blog among your friends
and remember sharing is caring so share
as much as u can.
If you have any doubt or query or
any problem, comment down the question if comment section and it would be
resolve as soon as possible.
Keep coding ….and keep yourself
updated which is the most important thing required in the field of coding, as
things keep changing every moment.
Keep sharing…..
Keep learning….
ReplyDeleteGreat Article
Thanks for sharing great information, keep it up
Nice article .thanks for sharing it. https://www.d3dsecurity.co.uk/
ReplyDelete