Wednesday 25 March 2015

funtion:with parameter and with out return value

#include<stdio.h>
#include<conio.h>
void add();
void main()
{       int a,b;
clrscr();
printf("\n enter abny two values");
scanf("%d%d",&a,&b);
add(a,b);
getch();
}
void add(int a,int b)
{
int c;
c=a+b;
printf("\n sum=%d",c);
}

No comments:

Post a Comment