/* Homwork two:(Binomial Theorem) 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. */ #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 ; //cout<<"The factorial is "<> num; //Calculate the factorial using loop cout << "the factorial is: "<< factorial(num)<< endl; */ //calculating the bino expansion of two integers cout << "Enter the two numbers whose binomial coeff we desire:" << endl; cin>>num_1; cin>>num_2; cout << "You entered the first no. as "<< num_1 << " and second number as "<