Thursday, January 21, 2016

Adding two number using user define function in C Programming

#include<stdio.h>

int sum(int a, int b){
int add;
add= a+b;

return add;

}

main()
{
int x,y;
while(1){

scanf("%d %d",&x,&y);
int jog;
jog = sum(x,y);

printf("%d\n",jog);

}
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)