A quadratic equation ax2 + bx + c = 0 has three inputs (a,b,c) and two outputs (x1 and x2). We assume that x1 = r1 + i*t1 and x2 = r2 + i*t2, i=sqrt(-1).
Write an engine program for solving the quadratic equation that accepts inputs (a.b.c) as command line arguments.
If there are three command line arguments, the program should display the results (x1 and x2) on the screen.
If there are no command line arguments then the engine should prompt the user to enter a,b,c and then compute and display the results (x1 and x2) on the screen.
If there are 4 command line arguments (a b c filename.dat) then the engine should take a,b,c and store the resulting x1 and x2 in filename.dat working in silent mode (no use of screen). Write a master program that activates the engine using system(...) call and then retrieves results from filename.dat and displays them on the screen.