C Programming

C – Find Sum of N Integer Numbers Using the Function

Write a c program to find the sum of the N integer numbers using the fuctions.

#include <stdio.h>
#include <conio.h>

int sum (int number);

void main()
int n;

printf("How many number : ");
scanf("%d", &n);

printf("sum the %d numbers is : %d ",n,sum(n));
int sum(int number){

int i, add=0;

for(i=1; i<=number; i++){
return add;


C program to find the sum of n integer numbers using function


About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.