I need to write an overloaded function for a pascal triangle. I have to include another function that fits n!/((n-r)!r!), I can't figure it out. Help please! This is what I have so far:
#include "stdafx.h"
#include <iostream>
using namespace std;
int my_fib(int,int);
int x,y,j;
int main()
{
x=0;
y=1;
for (int n=0; n<10; n++)
{
cout<<y<<",";
y=my_fib(x,y);
x=j;
}
return 0;
}
int my_fib(int x, int y)
{
j=y;
y=x+y;
x=j;
return y;
}