/* Exponential Series   : 1 + x + x2/2! + x3/3! + x4/4! + ...... */
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()


    {
	int n,i,def;
	float x,degree,temp,sum=0;
	clrscr();
	printf("Enter value for x:");
	scanf("%f",&x);
	printf("Enter number of terms:");
	scanf("%d",&n);
	degree=x;
	x=x*(3.1415/180);
	temp=1;

	for(i=1;i<=n;i++)
	{
		def=i;
		temp=temp*x/def;
		sum=sum+temp;
	}
	printf("\ne(%f)=%.5f",degree,sum);
	getch();
    }