/* Homwork two:(Binomial Theorem) Bethuel Khamala We know (x+y)^3 = x^3 + 3xy^2 + 3 x^2y + y^3 Now, we want this to be verified via a simple program which takes in two numbers x and y and an exponent say n. Then returns (x+y)^n. Next, we want a loop which calculates the binomial rule for this i.e., we want x^n + n xy^(n-1) + ... Need the task for calculating the binomial coefficients first. for which, we need the factorial of a whole number set up right. Solution: The loop below calculates the binomial coefficients of two numbers i.e, num_1 and num_2. */ #include #include using namespace std ; unsigned int factorial ( unsigned int num ) { int i =1, fact; fact =i ; while(i<=num) { fact=fact*i; i++; } return fact ; } int main() { cout << "Hello this program is a work in progress. The goal is to verify the binomial theorem." << endl ; cout << "We break this into a series of subtasks namely compute the binomial coefficients then multiply with the numbers."<>num_1; cin>>num_2; cout << "You entered the first no. as "<< num_1 << " and second number as "<