Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

TO IMPORT FACTORIAL AND FIND THE SUM OF N TERMS OF COS SERIES(1+1/2! +1/4! +…………….)

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.



This post first appeared on ShoutToWorld, please read the originial post: here

Share the post

TO IMPORT FACTORIAL AND FIND THE SUM OF N TERMS OF COS SERIES(1+1/2! +1/4! +…………….)

×

Subscribe to Shouttoworld

Get updates delivered right to your inbox!

Thank you for your subscription

×