ahmed0saber

Solve (x+i)(x+j)(x+k)(x+l) in C++

Nov 8th, 2020
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.     int i,j,k,l;
  6.     cout<<"(x+i)(x+j)(x+k)(x+l)=??\n";
  7.     cout<<"Enter i : ";
  8.     cin>>i;
  9.     cout<<"Enter j : ";
  10.     cin>>j;
  11.     cout<<"Enter k : ";
  12.     cin>>k;
  13.     cout<<"Enter l : ";
  14.     cin>>l;
  15.     cout<<"\n\n\n = x^4 + "<<i+j+k+l<<"x^3 + "<<i*j+j*k+i*k+i*l+j*l+k*l<<"x^2 + "<<i*j*k+i*j*l+i*k*l+j*k*l<<"x + "<<i*j*k*l;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment