[QUOTE=sameerthapa2050;79916]
Quote:
Originally Posted by aijaz View Post
hello frends ... i need sme help in developing some programs in C

1) i want the out like this 1
1 1
1 1 2
1 1 2 3
1 1 2 3 5
1 1 2 3 5 8 ... & soon .. till the range i specify

... here you can see tht we are adding the Diagonal digits ... plz help



#include<stdio.h>

void main()
{

int i,j,p,n,t;

for(i=1;i<7;i++)
{

p=0,n=1,t;

for(j=1;j<=i;j++)
{

printf("%d",n);

t=n;

n+=p;

p=t;

}

printf("\n");

}

}

}
abhix95 like this