jituTechnology

jituTechnology

Write a program to add first seven terms of the following series using loop 1/1!+2/2!+3/3!+…

Here is the c source code/program for: Write a program to add first seven terms of the following series using loop 1/1!+2/2!+3/3!+…

/* write a program to add first seven series using for loop
programmed by:
Name: Jitendra kumar Yadav
Roll: 16
Date: 12 feb 2011 */
#include <stdio.h>
#include <conio.h>
void main()
{
     int i;
   int fact=1;
   float sum=0;
   for(i=1; i<=7; i++)
   {
     fact=fact*i;
      sum=sum+(i*1.00/fact);
   }
   printf(“%f”,sum);
   getch();
}
Add a comment

Comments (1)

  1. Life ain’t nothing but a blending up of all the ups and downs.

Add a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Connect with Me

GPO 8973 NPC 541; Kathmandu Nepal
Phone: +977 9851236800

Calendar

April 2024
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
282930