c program to find sum of two numbers using functions


Example

#include<stdio.h>
void main() 
{ 
    int a,b; 
    clrscr(); 
    printf("Enter Two Number : "); 
    scanf("%d%d",&a,&b); 
    sum(a,b); 
    getch(); 
} 
    sum(int x,int y) 
    { 
        int z; 
        z=x+y; 
        printf("Sum of Two Number is : %d",z); 
        return 0; 
    } 
                                


Output

Enter Two Number : 50 70 
Sum of Two Number is : 120