Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please write a program that reads in the input rather than asking the user to enter the data. Please use atoi function. Write a C++
Please write a program that reads in the input rather than asking the user to enter the data.
Please use atoi function.
Write a C++ program that:
reads two linear equations from standard input (cin) and
if the two lines are parallel or collinear
print "NO SOLUTION"
if the two lines intersectprint "SOLUTION: (x,y) "
note: x and y should be rounded two three decimal places
HINT: Use the Line class you wrote for program 20
INPUT y = 5x + 9 y = -2x - 11 OUTPUT SOLUTION: (-2.857,-5.286)
INPUT x = 9 y = -2x - 11 OUTPUT SOLUTION: (9.000,-29.000)
INPUT y = -2x y = -2x - 11 OUTPUT NO SOLUTION
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started