How to add two number by using function in C.

#include<stdio.h>
#include<conio.h>
int add ( int a ,int b);
void main ()
{
int a,b,c;
clrscr();
printf(“Enter number for add:->”);
scanf(“%d%d”,&a,&b);
printf(“Your add is :->%d”,add(a,b));
getch();
}
int add(int a,int b)
{
int c;
c=a+b;
return(c);
}

After Running Program 🙂

Leave a Reply