Write a C program to code the following summation equation l

Write a \'C\' program to code the following summation equation:


l (7 //7) N-- ste-PAC-tee Print out (OCC Z Itit_

Solution

Consider the following program:

#include<stdio.h>
int main()
{
   int i=0;
   double sum =0;
   int n;
   printf(\"Enter the value of n: \");
   scanf(\"%d\",&n);
   for(i=0;i<=n;i++)
   {
       int res;
       res = 1 + (i*i);
       sum = sum + (1.0/res);
   }
   printf(\"Sum of series is %lf\",sum);
}//end of main function

Input:

5

Output:

In case of any difficulty, please look at this url

http://ideone.com/uJUlrT

Feel free to revert back.

Write a \'C\' program to code the following summation equation: l (7 //7) N-- ste-PAC-tee Print out (OCC Z Itit_ SolutionConsider the following program: #includ

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site