Code:
#include<stdio.h>
#include<stdlib.h>

int fac(int p);

int main(){ 
  int a,d,e;
  scanf("%d",&a);
  scanf("%d",&d); 
  e=fac(a)/(fac(d)*fac(a-d));
  printf("%d",e);
  return 0;
  system("pause");
}

int fac(int p){
 int p,b,c;
 b = 1;
 for(c=1;c<=p;c++){
   b=b*c;
 }
 return b;
}
I think you make so many error in your code. If your function will return integer, you must give the int to the function data type. It shows the data type it will return.

You cannot use void main in dev-cpp.

To make factorial function, you can try the recursive method.
Find out.
aniknaruto like this