answersLogoWhite

0


Best Answer

#include<iostream.h>

#include<conio.h>

void main()

{

int num_last,res=0;

cout<<"Enter the last number : ";

cin>>num_last;

for(int i=0;i<=num_last;i++)

res=res+i;

cout<<"Result is "<<res<<endl;

getch();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you find the sum of series 1 plus 2 plus 3 plus n using a c program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Program to generate Fibonacci series using storage class in c plus plus?

i dn't know. haha


Can you have the program in C plus plus for recursive function generating a series of terms?

Yes, this can be done. For example for Fibonacci series. You will find plenty of examples if you google for the types of series you need to be generated.


Write a c plus plus program to find the sum of series S equals 1 plus x2 plus x3 plus x3. plus xn?

(xn+2-1)/(x2-1)


Write a program in BASIC to find the sum of the series s equals 2 plus 4 plus . plus 100?

10 print "That is not a question." 20 print "That is a command." 30 end


C plus plus program using a stacks converting a postfix-infix?

Yes


4 plus 10 plus 16 plus plus 70 find the sum of this series?

4 plus 10 plus 16 plus 70 equals 100. To find the sum of this series, simply add all the numbers together.


Program to get a system time using c plus plus?

time in hours second minute


C plus plus program to find all even numbers between 100 and 150 using for loop?

#includeint main(){int i;for(i=2;i


How do you find the C programming of the sum of the series 5 plus 55 plus 555 plus . plus n terms?

Find the Sum to n terms of the series 5 5+55+555+ +n Terms


Find the sum of 1 plus 2 plus 3 plus . plus n nos using c program?

if (n%2==0) sum=n/2*(n+1); else sum=(n+1)/2*n;


Do I need to write a program to find a substring in a given string in c plus plus?

No.


How do you write a program in C plus plus plus plus How do you write a program in C to swap two variables without using the third oneo swap two variables without using the third one?

To swap two variables without using a third variable, use exclusive or manipulation... a ^= b; b ^= a; a ^= b;