Write a program to add the following
¼+2/4+3/4+5/3+6/3+...
(Like up to any 12 no.s)
Answer Posted / nitin garg
#include <stdio.h>
#include <conio.h>
int main()
{
float i,j,m=3,n=4;
float sum=0,fact=1;
for(i=1;i<=15;i++)
{
for(j=i;j<=m;j++)
{
sum=sum+(j/n);
printf("%f/%f +",j,n);
}
i=i+3;
m=m+4;
n--;
}
printf("
Sum of the series %f",sum);
getch();
}
Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
can any one provide me the notes of data structure for ignou cs-62 paper
What is the purpose of the following code? Is there any problem with the code? void send(int count, short *to, short *from) { /* count > 0 assumed */ register n = (count + 7) / 8; switch (count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while (--n > 0); } }
any C program contains only one function, it must be a) void () b) main () c) message () d) abc ()
Write a code to generate a series where the next element is the sum of last k terms.
What is structure of c program?
What does %2f mean in c?
What is oops c?
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
How will you print TATA alone from TATA POWER using string copy and concate commands in C?
Does c have class?
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
What are pointers?
What are static variables in c?
What is the code for 3 questions and answer check in VisualBasic.Net?
#define PRINT(int) printf("int = %d ",int) main() {< BR> intx,y,z; x=03;y=02;z=01; PRINT(x^x); z<<=3;PRINT(x); y>>=3;PRINT(y); }