C Program to add 2 numbers using function

0
677

Program to add 2 numbers using function

#include<stdio.h>
 
long add(long, long);
 
main()
{
   long a, b, sum;
 
   scanf("%ld%ld", &a, &b);
 
   sum = addition(a, b);
 
   printf("%ld\n", sum);
 
   return 0;
}
 
long add(long a, long b)
{
   long result;
 
   result = a + b;
 
   return result;
}

Leave a Reply