#include using namespace std; //Part 1: area of a recatngle //Area = height * width double area (double height, double width) { return height*width; } //Part 2: function to find the fatcorial of a number. //Factorial = product of all numbers from 1 to the number long factorial (int num) { long fact = 1; for( int i=1; i<=num; i++) fact = fact * num; return fact; } int main() { double h,w; cout<<"Enter the height of the rectangle: "; cin>>h; cout<<"Enter the width of the rectangle: "; cin>>w; cout<<"The area is "<>n; cout<<"Enter the value of k: "; cin>>k; long nChoosek = factorial(n) / (factorial(k) * factorial(n-k)); // We are ok with integer division because binomial coefficients are always integers. // There is a big proof on the internet if you're interested. // https://proofwiki.org/wiki/Binomial_Coefficient_is_Integer return 0; }