Friday, 24 June 2016


C programme to print the sum of 1+1/sqr(2)+1/sqr(3)+....
 
#include<stdio.h>
#include<conio.h>  
#include<math.h> 
int main() 
{  
int term,i=1;  
float sqr=0.0;  
printf("Enter number of terms you want");  
scanf("%d",&term);  
while(i<=term)  
 { 
   sqr=sqr+(float)1/pow(i,2);   
   i++;  
 }   
printf("\nThe ans is %f",sqr); 

}

0 comments:

Post a Comment

Have A Wonderful Day !

  • WE LOVE YOU ALL

    WE LOVE YOU ALL

      The user is always at the heart of the strategy.
  • MULTI-CULTI

    MULTI-CULTI

      There are 3 different languages spoken in our office.
  • COFFEE INTAKE

    COFFEE INTAKE

      Number of coffees consumed per hour on any given day.
  • WORKAHOLICS

    WORKAHOLICS

      The amount of time spent in the office, six days a week.

--------------------------------------------------------------------

Word Of The Day | Learn And Use A New Word Everyday!

--------------------------------------------------------------------

"Insidious"

Working or spreading in a hidden and usually injurious way

"glaucoma is an insidious disease"

Copyright © 2016 Engineers Burger - All Rights Reserved. Digital Craftmanship - Nikhil Jha and Jay Akbari.
Templateism MyBloggerLab.com