Ask Question

Name:
Title:
Your Question:

Answer Question

Name:
Your Answer:
User Submitted Source Code!


Description:
  main.c
Language: C/C++
Code:
#include <stdio.h>
#include <stdlib.h>
#include "application.h"

int main(int argc, char *argv[])
{
  printf("_arg1:%d _arg2:%dn", _arg1, _arg2);
  printf("_(arg1_+_arg2):%dn", add(_arg1, _arg2));
  printf("_(arg1_-_arg2):%dn", sub(_arg1, _arg2));
  printf("_(arg1_*_arg2):%dn", prod(_arg1, _arg2));
  printf("_(arg1_%_arg2):%dn", mod(_arg1, _arg2));
  system("PAUSE"); 
  return 0;
}


application.c:
--------------
#include "application.h"

int _arg1=10;
int _arg2=20;

int add(int x, int y)
{
  return(x+y);
}

int sub(int x, int y)
{
  return(x-y);
}

int prod(int x, int y)
{
  return(x*y);
}

int mod(int x, int y)
{
  return(x%y);
}
          
Comments: