rev='made'/> name='keywords'/> name='author'/> ANURANAN: UVa Problem Solution 900 : Brick Wall Patterns

Welcome Note

Hi,
I'm Anisuzzaman Babla . I am a full stack Android Application Developer. I am working with Android for more than two years. I have completed my graduation from IIT, Jahangirnagar University. I have developed a series of commercially successful apps on Android. Moreover, 10+ of my Apps are live at Google play store. .
Thank You

UVa Problem Solution 900 : Brick Wall Patterns

#include<stdio.h>
int main()
{
long b,p;
while(scanf("%ld",&b)==1)
{
if(b==0) break;
long  x=0,y=1,p=0;
int i;
for(i=1;i<=b;i++)
{
p=x+y;
x=y;
y=p;
}
printf("%ld\n",p);
}
return 0;
}

No comments:

Post a Comment