Computer Science, asked by xahangalib19, 2 days ago

Solve by c program, fast.

Attachments:

Answers

Answered by ujjwalsinha1979
0

Answer:

gzt

Explanation:

do indian hacker and then that

Answered by samarthkrv
1

Answer:

#include<stdio.h>

int sum(int n);

void main()

{

printf("Enter a number:");

int num;

scanf("%d" , &num);

printf("1 + 2 ..n = %d" , sum(num));

}

int sum(int n)

{

   int sum = 0;

       for(int i = n; i >= 0; i--)

       {

           sum = sum + i;

       }

       return sum;

}

Explanation:

please mark as brainliest not spam

Similar questions