PROGRAM
import factorial.*;
import java.io.*;
import java.lang.*;
class cosseries
{
public static void main(String arg[])
{
fact s=new fact();
double sum=1,r;
int n;
try
{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("\nEnter the value of n :");
n=Integer.parseInt(br.readLine());
int k;
for(k=2;k
OUTPUT
Enter the value of n :10
Sum :2.141666666666667
TO Import Factorial AND FIND THE SUM OF N TERMS OF COS SERIES(1+1/2! +1/4! +…………….) is a post from ShoutToWorld - Let's Learn Let's Shout - Helping bloggers and developers.
Related Articles