C Programming
Computer Programming

C Program using function to Find the sum of two number



Write a Program in C using function to find the sum of two number

\* C Program using function to Find the sum of two number *\

# include < stdio.h >
# include < conio.h >
int   sum(int, int) ;

int   main( )
{

int x, y, reg = 0 ;
printf(" Enter first Number : ") ;
scanf("%d", &x) ;
printf(" Enter Second Number : ") ;
scanf("%d", &y) ;
reg = sum(x , y) ;
printf("\n Sum of two Number are : %d ", reg) ;
return (0);

}

int   sum(int a, int b)
{

int add = 0;
add = a + b;
return add;

}

Output of Program :

Output of Program in C to find the sum of two number using function