UVa 11000:BEE

This is one of the special problems i did!
#Hints
The output works on Fibonacci Series

Here is the
Source Code:


#include<stdio.h>
int main()
{
long long y,n,m=0,o,to;
while(scanf(“%lld”,&y)==1 && y>=0)
{long long t1=-1,t2=1,s,t3=0,t4=1,l=0,p=0,to;
for(m=0;m<=y;m++)
{s=t1+t2;

t1=t2;

t2=s;l+=s;

p+=t1+t2;
}
printf(“%lld %lld\n”,l,p);
}
return 0;
}

Advertisements

About waprogramming

I am in CSE,from CUET
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s