Get Email Subscription

Enter your email address:

Delivered by FeedBurner

Showing posts with label Sum of series in C. Show all posts
Showing posts with label Sum of series in C. Show all posts

Saturday, January 23, 2010

Write a program in c to find and print the product p = 15 * 14 * 13 * .... * 1



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, p;
p = 1;
for (i=15; i > = 1; i=i-1)
{
p = p * i;
}
printf("\n The product is %d \n", p);
return(0);
}
read more "Write a program in c to find and print the product p = 15 * 14 * 13 * .... * 1"

Write a program in c to find the sum s = 1/3 + 3/5 + 5/7 + 7/9 + 9/11 +11/13 + 13/15



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, s;
s = 0;
for (i=1; i < = 13; i=i+2)
{
s = s + i / (i+2);
}
printf("\n The sum is %d \n", s);
return(0);
}
read more "Write a program in c to find the sum s = 1/3 + 3/5 + 5/7 + 7/9 + 9/11 +11/13 + 13/15"

Write a program in c to find the sum s = 1/2 + 3/4 + 5/6 + 7/8 + 9/10 + 11/12



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, s;
s = 0;
for (i=1; i < = 11; i=i+2)
{
s = s + i / (i+1);
}
printf("\n The sum is %d \n", s);
return(0);
}
read more "Write a program in c to find the sum s = 1/2 + 3/4 + 5/6 + 7/8 + 9/10 + 11/12"

Write a program in c to find the sum s = 1*6 + 2*9 + 3*12 + 10*33



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, j, s;
s = 0;
for (i=1, j=6; i < = 10, j < = 33; i=i+1, j=j+3)
{
s = s + i * j;
}
printf("\n The sum is %d \n", s);
return(0);
}
read more "Write a program in c to find the sum s = 1*6 + 2*9 + 3*12 + 10*33"

Write a program in c to find and print the product p = 3 * 6 * 9 * ....... * 30


#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int j, p;
p = 1;
for ( j=3; j < = 30; j=j+3)
{
p = p * j;
}
printf("\n The product is %f \n", p);
return(0);
}
read more "Write a program in c to find and print the product p = 3 * 6 * 9 * ....... * 30"

Write a program in c to find and print the product p = 1 * 2 * 3 * 4 * ...... *10


#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, p;
p = 1;
for ( i=1; i < = 10; i++)
{
p = p * i;
}
printf("\n The product is %f \n", p);
return(0);
}
read more "Write a program in c to find and print the product p = 1 * 2 * 3 * 4 * ...... *10"

Write a program in c to find the sum s = 1*2 + 2*3 + 3*4 + 4*5 + .... + 10*11



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, s;
s = 0;
for (i=1; i < = 10; i++)
{
s = s + i * (i++);
}
printf("\n The sum is %d \n", s);
return(0);
}
read more "Write a program in c to find the sum s = 1*2 + 2*3 + 3*4 + 4*5 + .... + 10*11"

Write a program in c find the sum of s = 1*3 + 3*5 + 5*7 + 7*9 + ............. + 21*23



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, s;
s = 0;
for (i=1; i < = 21; i=i+2)
{
s = s + i * (i+2);
}
printf("\n The sum is %d \n", s);
return(0);
}
read more "Write a program in c find the sum of s = 1*3 + 3*5 + 5*7 + 7*9 + ............. + 21*23"

Write a program in c find the sum of s = 2 + 4 + 6 + 8 + ........... + 20



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, s;
s = 0;
for (i=2; i < = 20; i=i+2)
{
s = s + i;
}
printf("\n The sum is %d \n", s);
return(0);
}
read more "Write a program in c find the sum of s = 2 + 4 + 6 + 8 + ........... + 20"

Write a program in c to find the sum ( s = 1 + 2 + 3 + 4 + 5 + ....... + 100 )



#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int i, s;
s = 0;
for (i=1; i < = 100; i++)
{
s = s + i;
}
printf("\n The sum is %d \n", s);
return(0);
}
read more "Write a program in c to find the sum ( s = 1 + 2 + 3 + 4 + 5 + ....... + 100 )"

About This Blog

Lorem Ipsum

  © Blogger templates Newspaper III by Ourblogtemplates.com 2008

Back to TOP