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 to add the following
¼+2/4+3/4+5/3+6/3+...

(Like up to any 12 no.s)



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

Post New Answer

More C Interview Questions

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”.

1 Answers  


int main() { int *p=new int; *p=10; del p; cout<<*p; *p= 60; cout<<*p; } what will be the output & why?

4 Answers   TCS,


What's the difference between struct x1 { ... }; and typedef struct { ... } x2; ?

3 Answers  


Write a program in C to convert date displayed in gregorian to julian date

0 Answers   HCL, Wipro,


Program to find the absolute value of given integer using Conditional Operators

6 Answers   N Tech,


How can I read in an object file and jump to locations in it?

0 Answers  


What is output redirection?

0 Answers  


Write a code to determine the total number of stops an elevator would take to serve N number of people.

0 Answers   Expedia,


write a program to display the frequency of each element in a given array in c language

1 Answers  


Can u please send me the exam pattern and also Previous papers to javed123go@gmail.com

0 Answers  


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++;

2 Answers   Google,


In C programming, how do you insert quote characters (‘ and “) into the output screen?

0 Answers  


Categories