Advertisement
touhid_xml

User Define Function in C

Jul 14th, 2015
487
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.23 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int add(int x, int y){
  4.  
  5.     return x+y;
  6.  
  7. }
  8.  
  9. int mul(int x, int y){
  10. return x*y;
  11. }
  12.  
  13.  
  14. int main(){
  15.     printf("Total: %d\n",add(10,20));
  16.     printf("Total: %d\n",mul(10,20));
  17.  
  18.  
  19.  
  20.     return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement