**Sum of 1 + 2 + …. + n series in c programming language**

#include<stdio.h>

int main(){

int n,i;

int sum=0;

printf("Enter
the n i.e. max values of series: ");

scanf("%d",&n);

sum
= (n * (n + 1)) / 2;

printf("Sum of
the series: ");

for(i =1;i <=
n;i++){

if (i!=n)

printf("%d +
",i);

else

printf("%d = %d
",i,sum);

}

return 0;

}

**Sample output:**

Enter the n i.e. max values
of series: 5

Sum of the series: 1 + 2 + 3
+ 4 + 5 = 15

**Mathematical Formula:**

Sum of the series 1 + 2 + 3
+ … + n = n (n+1)/2

6. Write a c program to find out the sum of given H.P.

## 123 comments:

give me solution for below series....

0 1 3 6 10 15 21.....n

0,1,3,10,15,21....n

void main()

{

int i,s=0,n=10;

printf("%d",s);

for(i=1;i<=n;i++)

{

s=s+i;

printf("%d",&s);}

}

give me solution for S= 1!+2!+3!+4!+....N!

return the sum from 1 to the int argument input, i,e, if the argument is N, return 1+2+3+4....+N????

how we'll write a program to find sum of series 1+2-3+4....-n without using "if"..plss help me out...

give me a solution for given series:

1+7+13+19+25+..........

give me solution for 1+2+4+7+11.............

Write a „C‟ program to solve the series S = -1+3-11+43-171+….

There is no result found in google

give me the result.

#include

long factorial(int n)

{

long p=1;

for(int n=1; i<=n; i++)

p=p*i;

return p;

}

void main(){

int n; long p;

cout<<"Input n:";

cin>>n;

p=factorial(n)

cout<<"Factorial="<<p;

}

Write a c program to find out the sum of series 1 + 2 + 4 + 8 … to infinity.using for loop

#include

#include

int main()

{

int i,n;

int sum=1;

cout<<"enter the number up to which u want to add : ";

cin>>n;

for(i=1;i<=n;i=i+i)

{

sum=sum+i+i;

}

cout<<"the sum is: "<<sum;

getch();

return 0;

}

some one help me to find the sum of 1+1/2!+1/3!+----- - - -

1+2+3+---------------n

#include

#include

void main()

{

int i,n,sum,d;

sum=0,d=1;

printf("Enter the no of term in series: ");

scanf("%d",&n);

for(i =1;i <= n;i++)

{

sum=sum+d;

d=d+1;

}

getch();

}

is this write

Give me solution for

1+1/!3+1/!5+1/!7+............

Give me solution for

1+3+3^2+3^3+3^4+....

wht will be d soln for tis 1/2-3/4+5/6-7/8........upto nth term

$number=25;

$j=0;

for($i=0;$i<=$number;$i+=$j){

$j++;

echo $i.",";

$number=5;

$p=1;

$total="";

for($i=1;$i<=$number;$i++){

$p*=$i;

echo "1/".$i."!+";

$total+=1/$p;

}

echo "=".$total;

$number=7;

$p=1;

$total="";

for($i=1;$i<=$number;$i+=2){

$p*=$i;

echo "1/".$i."!+";

$total+=1/$p;

}

echo "=".$total;

give me solution for below series....

4 3 2 1

4 3 2

4 3

4

summation of this series 1+1/3+1/5+.....+1/299

#include

#include

void main()

{

int i,r;

printf("Enter the number range:");

scanf("%d",&r);

for (i=1;i<r;i=i+6)

{

printf("%d ",i);

}

}

int base = 3;

int sum = 1 ;

int prd = 1;

int exp = 2;

for (int i = 1;i<=exp;i++)

{

//int z = 3;

prd = prd*base;

sum = sum +prd;

}

printf("sum =%d",sum);

for(int i=1;i<=4;i++)

{

for(int j=4;j>=i;j--)

{

printf("%d\t",*);

}

printf("\n");

}

S=1-3+5-7+9.....

give me the solution for

1/2+3/4+5/6+....+n

int main()

{

int i, j, n;

float sum = 0;

printf("\n Enter the Value of n:");

scanf("%d",&n);

for(i=1, j=1; i<=n; i++, j=j+2)

{

sum = sum+(float)(j)/(j+1);

}

printf("sum= %f",sum);

}

int main()

{

int i, j, n;

float sum = 0;

printf("\n Enter the Value of n:");

scanf("%d",&n);

for(i=1, j=1; i<=n; i++, j=j+2)

{

sum = sum+(float)(j)/(j+1);

}

printf("sum= %f",sum);

}

public class First

{

public static void main(String[] args)

{

int s=1;

for(int i=1;i<=5;i++)

{

System.out.println(s);

s=s+i;

}

}

}

#include

#include

int main()

{

int i,n;

int sum=1;

cout<<"enter the number up to which u want to add : ";

cin>>n;

for(i=1;i<=n;i=i+i)

{

sum=sum+i+i;

}

cout<<"the sum is: "<<sum;

getch();

return 0;

}

a c program to display the series 1,2,6,15,31,56 …… N

I am new in program.......................................

give the solation of 1+2+3+4+......................+100=?

Write a program to generate the first n terms in the series --- 20,19,17,..,10,5

anyone help with this

#include

#include

void main()

{

int i,n,s=1;

printf("Enter the no of term in series: ");

scanf("%d",&n);

for(i 0;i <= n;i++)

{

s=s+(i*i);

}

printf("%d",s);

getch();

}

int m=20;

for(i=1; i<=n; i++)

{

printf("%d ", m );

m=m-i;

}

Program to generate series 3 9 27 81 243

Write a program to generate the first n terms in the series --- 6,11,21,36,56,...

can anyone help me for above problem!!

write a program to find the sum of series 1+2+3+............+20 using while loop on c program

Write a program to generate the first n terms in the series --- 20,19,17,..,10,5

#include

int main()

{

int n,count,x=1,p;

scanf("%d",&n);

printf("%d ",n);

p=n;

for ( count = 2 ; count <= n ; count++ )

{

p=p+(x*(n-1));

x++;

printf("%d ",p);

}

return 0;

}

Write a program to generate the first n terms in the series --- 20,19,17,..,10,5

Thank u :)

Write a program for 1/2 + 3/4 + 5/6 +7/8 +.......n

give me a answr for this

1-2+3-4+5-6+.......n

define MAX 100000

void rec(int prev)

{

int curr;

curr=prev*4-1;

printf("%d ",curr);

if (curr<MAX)

rec(curr);

return;

}

int main()

{

rec(0);

//...something else

}

1+(1+3)+(1+3+5)+(1+3+5+......n)program in c

1+(1+3)+(1+3+5)+(1+3+5+......n)program in c

Please give me solution....

1

22

333

4444

55555

i need this series 1 , 0 ,3 ,0 ,

Write the program for summation of numbers from 1 to 5. (Include no. 5, where 1+2+3+4+5)

Solution for Nth term series :

1,0,1,0,1,0...

give the string "WORDPROCESSING",write a program to read the string from the terminal and display the same in the following formats:

(a).WORD PROCESSING

(b)WORD

PROCESSING

(c).W.P.

give the string "WORDPROCESSING",write a program to read the string from the terminal and display the same in the following formats:

(a).WORD PROCESSING

(b)WORD

PROCESSING

(c).W.P.

display the series 1,2,6,15,31,56....N..... plz give crct program

hello frd,

c program to display the series 1,2,6,15,31,56 …… N

plz send program

use pow ( ) function

give me solution...with c

1+1+1+1+1+2+3+4+5+6+8+10+12+14+16+19+22+25+....+50=?

1 5 8 2 4 9 3 3 10 4 2 11 5 1 12

can anyone help me

S=1/1+1/2+1/3+1/4...................1/n

S=1/1+2/2+3/3+4/4+........................n\n

1.2.4+2.3.6+3.4.8+.....10.11.22

Can anyone help me?

nice logic...!

Write a program to generate the first n terms in the series --- 2,3,5,7,11,...,17

Input Format:

Input consists of a single integer which corresponds to n.

Output Format:

Output consists of the terms in the series separated by a blank space.

Sample Input:

8

Sample Output:

2 3 5 7 11 13 17 19

value of 4^3^2 using c programming

value of 4^3^2 using c programming

can u give me the soln

1/2+3/4+5/6+.......(n-1)/n(where n is as input)

An original way to calculate the square of a number n

is to make the sum of the first n odd numbers.

Examples:

5^2 = 1+3+5+7+9 = 25

4^2 = 1+3+5+7 = 16

3^2 = 1+3+5 = 9

2^2 = 1+3 = 4

1^2 = 1 = 1

help me!

write a program that solve 1!+2!+3!+...........+N!

tell the answer anybody

who is a good programer

plzzzzzzzzzzzzzz,,,,,,,,,,,,..........

write a program to get the below output

1

1 2

1 2 3

1 2 3 4

1 2 3 4 5

can any 1 help me out ...im a beginner !

write a c program for fibonacce numbers below 50

Class series

{

Void fibonacci ()

{

Int a =0, b=1, c, i=3;

System.out.print (a+ "," + b);

do

{

c=a+b;

System.out.print ("," + c);

a=b;

b=c;

i++;

}while (i <=n);

}

}

Can anyone help me out with this

SUM=2!+4!+6!+...+2n!

can you help me to print the series 7,5,8,6,9,.....

a^0+a^1+a^2+............+a^n

where a=3 and n=5. solution needed.

1+(2*3)+(4*5*6)+…n

Pls give me solution to this........

1/2+3/4+5/6+.....+n

Give me solution to this

6,11,21,36,56,81

Please help me to solve this

Write a program to generate the first n terms in the series --- 3,9,27,81,...,...

Input Format:

Input consists of a single integer which corresponds to n.

Output Format:

Output consists of the terms in the series separated by a blank space.

Sample Input:

6

Sample Output:

3 9 27 81 243 729

Please help me to solve this

Write a program to generate the first n terms in the series --- 6,11,21,36,56,...

Input Format:

Input consists of a single integer which corresponds to n.

Output Format:

Output consists of the terms in the series separated by a blank space.

Sample Input:

6

Sample Output:

6 11 21 36 56 81

Please help me to solve this

Write a program to generate the first n terms in the series --- 6,11,21,36,56,...

Input Format:

Input consists of a single integer which corresponds to n.

Output Format:

Output consists of the terms in the series separated by a blank space.

Sample Input:

6

Sample Output:

6 11 21 36 56 81

#include

//#include "stdafx.h"

int main()

{

int n = 6, m = 10;

for(int j = 0; j<= m; j++)

{

n += j*5;

printf("%d\t", n);

}

getchar();

}

#include

#include "stdafx.h"

int main()

{

int n = 6, m = 10;

for(int j = 0; j<= m; j++)

{

n += j*5;

printf("%d\t", n);

}

getchar();

}

#include

//#include "stdafx.h"

int main()

{

int n = 3, m = 1,N = 10;

while(N>0)

{

m *= n ;

printf("%d\t", m);

N--;

}

getchar();

}

#include

int main()

{

int n,i,a=6;

scanf("%d",&i);

printf("%d ",a);

for(n=1;n<=i;n++)

{

a=a+n*5;

if(a<=81)

printf("%d ",a);

else

break;

}

return 0;

}

another way please where we just input n and printf is once used only

dis u gt the right answer

Please help me to solve this :

Write a C program which will find the sum of the N-terms of the below

series. The program will consist of a MAIN function and a function.

2^n/n

Within the MAIN function.

• Number of terms N will be read from the standard input.

• N will be passed to the function as an argument.

• Sum of the N terms(return value from the function) will be printed.

Within the function.

• Sum of the N terms of the given series will be calculated and returned

to the MAIN function.

write a program in c++for that will take a number "n" as input and print the output in that formate if n=3 print in 2 1,1+2=2 1,2+3=3

some on plz sum of 1^2+(1^2-3^2)+(1^2-3^2+5^2)+(1^2-3^2+5^2-7^2)......n th series in c programming

some on plz sum of 1^2+(1^2-3^2)+(1^2-3^2+5^2)+(1^2-3^2+5^2-7^2)......n th series in c programming

2+5+9+14+....nth

Give me a solution for

2*3+3*4+4*5+.....+(n+1)(n+2)

Where 'n' represents the number of tarms

Write a program to generate the first n terms in the series --- 9,11,20,31,...,82

pls give me solution for this

input=45

output should be sum of these digits ..i.e.,4+5=9

if input =542

output should be sum of 5+4+2=11 then it should be again added i.e.,1+1=2

#include

Int main ()

{

Int n, I, add=0;

Printf ("\nEnter a No:");

Scanf ("% d",&n);

for (I=0:I <=n; I++)

add=add+I;

printf ("total no of sum=% d", add);

return 0;

}

I got answer for the my previous doubt and program is

#include

#include

void main()

{

unsigned long long int no,num;

int t,sum=0;

clrscr();

printf("\nEnter number");

scanf("%ld",&num);

no=num;

LOOP:while(no)

{

t=no%10;

no=no/10;

sum=sum+t;

}

if(sum>9)

{

no=sum;

sum=0;

goto LOOP;

}

printf("%d",sum);

getch();

}

Result:

input :123456789

output:9

2,2,4,6,10,16 upto 12 plz help...anyone..

2,2,4,6,10,16 upto 12 plz help...anyone..

A Pascal number is a number that is the sum of the integers from 1 to j for some j. For example 6 is a Pascal number because 6 = 1 + 2 + 3. Here j is 3. Another Pascal number

is 15 because 15 = 1 + 2 + 3 + 4 + 5. An example of a number that is not a Pascal number is 7 because it falls between the Pascal numbers 6 and 10

Write a function named isPascal that returns 1 if its integer argument is a Pascal number,

otherwise it returns 0.

The signature of the function is

int isPascal (int n)

How to find season program use menu in c program?

pls helpm me with this series -1 2 3 6 4 5 6 15 7 8 9

plz solve this question .

display the series 15,9......up to 20th term.

Please solve this

Write a program in c to get the sum of series

1+1/2+2/3+3/4.....49/51

Please solve this

Write a program in c to get the sum of series

1+1/2+2/3+3/4.....49/51

WAP to print and find the sum of the series: 1, 4, 6, 9, 11……… upto n terms.

Could anyone please post a c program for the series --9 11 20 31 51 82.

Input : 6

Output: 9 11 20 31 51 82

Consider the following series of numbers (for questions 1 and 2)

2,6,11,17,24,32,41,51,62,…n<200

1. Write a java program using while loop that printout the numbers in each iteration.

2. Write a java program using for loop that printout the numbers in each iteration.

What will be the code for 2/2!-6/4!+12/6!-20/8!+.........upto N term ic C

1+4+7+10+13...

plz solve this

WAP to display the series: 1 6 11 16 21 nth term plz fast

1

Nikmati Bonus Menarik Dari Bolavita Sekarang...

-Nikmati Bous New member 10%

-Nikmati Bonus Cashback Hingga 10%

-Nikmati Juga Bonus jackpot Hingga Ratusan juta Rupiah Setiap harinya...

Info Lengkap Hubungi:

WA : 0812-2222-995

Line : cs_bolavita

Link : www.bolavita1.com

TERIMA KASIH

Agen Togel Singapura

Agen Togel Sidney

Museumbola Slot Pragmatic

Museumbola Slot Pulsa

KUMPULAN MISTERI DUNIA

AKSES SEGERA SITUS KAMI 1 ID BANYAK PERMAINAN

WA OFFICIAL : +6283157394921

Post a Comment