The program uses a user-defined function. A function defined by the user is equivalent to a subroutine in FORTRAN or subprogram in BASIC.
#include <stdio.h> main() { int a,b,c; a = 5; b = 10; c = mul(a,b); printf(" Multiplication of %d and %d is %d.", a,b,c); } mul(x,y) int p,x,y; { p = x*y; return(p); }
No comments:
Post a Comment