Computer Science, asked by rajjadhavjadhav0804, 5 months ago

write an algorithm to find out the sum of series 1+2+3..... N​

Answers

Answered by TheDeadlyWasp
4

Write a c program to find out the sum of series 1 + 2 + …. + n

#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: ");

Answered by snehaldespande14
0

Answer:

n =NaturalNumbers..............

Similar questions