February 14, 2011

C Program for Addition of Two Number's using User Define Function

Simple Program for Addition of  Two Number's using User Define Function.


Code:
//C Program for Addition of  Two Number's using User Define Function
#include<stdio.h>
#include<conio.h>
float add(float,float);
void main()
{

float a,b,c;
clrscr();
printf("Enter the value for a & b\n\n");
scanf("%f
%f",&a,&b);
c=add(a,b);
printf("\nc=%f",c);
getch();
}
float add(float x,float y)
{
float z;
z=x+y;
return(z);
}

Hope you liked my posts, give comments if you have any doubts.. :)

Related Posts :



Categories: ,

1 comments:

fantastic work, its a really great and informative for us.........beginners of c programming.

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Related Posts with Thumbnails