Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static double newton(int x, int y)
- {
- if(x > 33 || y > 33)
- {
- cout << -1 <<;
- }
- else if(x == 0 || x == y)
- {
- return 1;
- }
- else if(x>0 && y>0 && y>x)
- {
- return newton(x-1, y-1) + newton(x-1,y);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement