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?



write a program for egyptian fractions in c?..

Answer / 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

More C Interview Questions

main() { int i=5; printf("%d%d%d%d",i++,i--,i); }

10 Answers  


What are the salient features of c languages?

0 Answers  


what is event driven software and what is procedural driven software?

0 Answers  


What is assert and when would I use it?

0 Answers  


What does static mean in c?

1 Answers  


When should a type cast not be used?

0 Answers  


what is the use of pointers

6 Answers   Adobe, GrapeCity,


Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors

3 Answers  


c program to subtract between two numbers without using '-' sign and subtract function.

2 Answers  


What is a Deque?

2 Answers  


Please write the area of a RIGHT ANGLED TRIANGLE.

1 Answers  


Blade logic interview question. 1st round is a written tests with 15 multiple questions from c and c++. All are simple basic question. Like int main () { Int i=65; Return printf(ā€œ%cā€, i); } 2nd and 3rd round is technical interview. The position for which I was interview was core UNIX and c. Yes it is for system programming. The company has product name blade server. For their server they are creating their own command for their purpose. Example cd command. We can implement it in a c program by using the chdir() function. So the question asks related to PID, fork, pipe, shared memory, signal. Write a program in c which will act as cp command.

1 Answers   BladeLogic, Infosys,


Categories