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)

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


Please Help Members By Posting Answers For Below Questions

Is array name a pointer?

1035


List some applications of c programming language?

959


What is line in c preprocessor?

1066


Explain what header files do I need in order to define the standard library functions I use?

1175


What is the newline escape sequence?

1078


What is difference between far and near pointers?

1048


main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above

1106


What is #line?

1062


Why is c so popular?

1166


Why do some versions of toupper act strangely if given an upper-case letter?

1079


What is the difference between Printf(..) and sprint(...) ?

1548


How many levels of pointers have?

1056


What is a void pointer? When is a void pointer used?

1065


What is the difference between int main and void main?

1051


What does a derived class inherit from a base class a) Only the Public members of the base class b) Only the Protected members of the base class c) Both the Public and the Protected members of the base class d) .c file

1120