c program to sum of two numbers using function

C program to sum of two numbers using function



#include<stdio.h>
#include<conio.h>
int sum(int,int);                   // function declaration
void main()
{
int num1,num2;
printf("enter first value: ");
scanf("%d",&num1);
printf("enter second value: ");
scanf("%d",&num2);
int total = sum(num1,num2);
printf("additoin is %d",total);
getch();
}
int sum(int x,int y) {         //function definition
return x + y;
}

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.