Powered By Blogger

Monday, May 4, 2009

C Programming

#include
#include
void main()
{
int n;float a,sum=0;
clrscr();
printf("Enter your number:");
scanf("%d",&n);
a=1;
while(a<=n) { sum=sum+(1/a); a=a+1; } printf("Your value of the seris 1+1/2+......=%f",sum); getch(); }

0 comments:

About This Blog

This is an important blog about updated news about computer science and technology.

Blog Archive

Visitors

  © Free Blogger Templates Blogger Theme II by Ourblogtemplates.com 2008

Back to TOP