linklist
#include
#include
float fact(int x)
{ int f;
if (x==0)
return (1);
else
f=x*fact(x-1);
return f;
}
void main()
{ int j,i;
float ax[22][22],y, no,h=0,x,ux=1,u,mx;
printf("\n only for equal interval");
printf("\n enter the no. of term");
scanf("%f",&no);
printf("\n enter the value of x ");
for(i=0;i=0;i--)
ax[i][j]=ax[i][j-1]-ax[i-1][j-1];
y=ax[no-1][1];
for(i=0;i
{
ux=ux*(u+i);
y=y+((ux*ax[no-1][i+2])/fact(i));
}
printf("value %f",y);
getch();
}
#include
#include
#include
#include
void main()
{
int n,i,*p;
struct node
{
int num;
struct node *ptr;
};
typedef struct node NODE;
NODE *start, *first,*end,*item,*temp,*head,*beg,*last;
clrscr();
printf("enter no of data");
scanf("%d",&n);
printf("\n enter data\n");
for(i=0;inum);
if(i==0)
{ first=start;}
temp->ptr=start;
temp=start;
}
temp->ptr=NULL;
start->ptr=NULL;
printf("\n enter data to insert at begning\t");
scanf("%d", &beg->num);
beg->ptr=first;
temp=beg;
printf("\n enter data to insert at last\t");
scanf("%d", &end->num);
start->ptr=end;
end->ptr=NULL;
printf("\n entered data are : \n");
while(temp)
{
printf("\n %d",temp->num);
temp=temp->ptr;
}
getch();
}
#include
#include
#include
void main()
{
int n,i,*p;
struct node
{
int num;
struct node *ptr;
};
typedef struct node NODE;
NODE *start, *first,*end,*item,*temp,*head,*beg,*last;
clrscr();
printf("enter no of data");
scanf("%d",&n);
printf("\n enter data\n");
for(i=0;i
if(i==0)
{ first=start;}
temp->ptr=start;
temp=start;
}
temp->ptr=NULL;
start->ptr=NULL;
printf("\n enter data to insert at begning\t");
scanf("%d", &beg->num);
beg->ptr=first;
temp=beg;
printf("\n enter data to insert at last\t");
scanf("%d", &end->num);
start->ptr=end;
end->ptr=NULL;
printf("\n entered data are : \n");
while(temp)
{
printf("\n %d",temp->num);
temp=temp->ptr;
}
getch();
}
lagrange
#include
#include
void main()
{
float i,j,n,x[22],y[22],x1[22],x2[22],xx,yy;
printf("enter no of terms");
scanf("%f",&n);
printf("\n enter x");
for(i=0;i
#include
void main()
{
float i,j,n,x[22],y[22],x1[22],x2[22],xx,yy;
printf("enter no of terms");
scanf("%f",&n);
printf("\n enter x");
for(i=0;i
factorial
#include
#include
int fact(int fact)
{
if (fact==0)
return 1;
else
return (fact*(fact-1));
}
main()
{
int ff,f;
scanf("%d",&f);
printf("%d",fact(f));
}
#include
int fact(int fact)
{
if (fact==0)
return 1;
else
return (fact*(fact-1));
}
main()
{
int ff,f;
scanf("%d",&f);
printf("%d",fact(f));
}
NBDF
#include#include
#include
float fact(int x)
{ int f;
if (x==0)
return (1);
else
f=x*fact(x-1);
return f;
}
void main()
{ int j,i;
float ax[22][22],y, no,h=0,x,ux=1,u,mx;
printf("\n only for equal interval");
printf("\n enter the no. of term");
scanf("%f",&no);
printf("\n enter the value of x ");
for(i=0;i
ax[i][j]=ax[i][j-1]-ax[i-1][j-1];
y=ax[no-1][1];
for(i=0;i
{
ux=ux*(u+i);
y=y+((ux*ax[no-1][i+2])/fact(i));
}
printf("value %f",y);
getch();
}
No comments:
Post a Comment