Write a program to add the following
¼+2/4+3/4+5/3+6/3+...
(Like up to any 12 no.s)
Answer / 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 |
whenever a question is posted in a particular category in allinterview.com, Is there any facility to receive an indication mail. For eg: I need to receive an indication email, whenever a question is posted under the category “C Langauage”.
int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?
What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?
Write a program in C to convert date displayed in gregorian to julian date
Program to find the absolute value of given integer using Conditional Operators
How can I read in an object file and jump to locations in it?
What is output redirection?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
write a program to display the frequency of each element in a given array in c language
Can u please send me the exam pattern and also Previous papers to javed123go@gmail.com
what is the purpose of the code, and is there any problem with it. unsigned int v[10]; unsigned int i = 0; while (i < 10) v[i] = i++;
In C programming, how do you insert quote characters (‘ and “) into the output screen?