Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a program for egyptian fractions in c?

Answer Posted / himaja

egyptian fraction is of the series eg 1/2+1/3=5/6.
#include<stdio.h>
#include<conio.h>
main()
{
int n,i=2,sum=0;
float m=0;
scanf("%d",&n);
for(i=0;i<=n;i++)
{
m = float(1/i);
sum=sum+m;
}
printf("%d",sum);
getch();

}

Is This Answer Correct ?    7 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use any name in place of argv and argc as command line arguments?

1059


Why c is a procedural language?

1043


how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....

1781


What is pivot in c?

1017


When c language was developed?

1049


Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?

2562


Why is structure padding done in c?

1113


What is the difference between array and linked list in c?

1134


What is the size of empty structure in c?

1070


What is mean by Data Driven framework in QTP? Can any one answer me in details on this regard.

2246


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

1128


What is c value paradox explain?

1075


Differentiate between static and dynamic modeling.

1083


Write a Program to accept different goods with the number, price and date of purchase and display them

6221


how can I convert a string to a number?

1072