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 |
write a program to find the largest and second largest integer from an array
Are comments included during the compilation stage and placed in the EXE file as well?
pgm to reverse string using arrays i.e god is love becomes love is god) (assumption:only space is used for seperation of words) no addtional memory used.i.e no temporary arrays can used.
find largest element in array w/o using sorting techniques.
size maximum allocated by calloc()
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }
what are the difference between ANSI C and Let Us c and Turbo C
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
7 Answers Accenture, Gridco, IBM, Kevin IT, TCS, Vimukti Technologies,
what is the difference between global variable & static variable declared out side all the function in the file.
what is difference between ++(*p) and (*p)++
17 Answers Accenture, HCL, IBM,
What is omp_num_threads?
What is %d called in c?