Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Im suppose to do a quadratic equation using Pascal, im using a online Pascal compiler and it keeps saying /usr/bin/ld: warning: link.res contains output

Im suppose to do a quadratic equation using Pascal, im using a online Pascal compiler and it keeps saying "/usr/bin/ld: warning: link.res contains output sections; did you forget -T?" this is the website im using: https://www.jdoodle.com/execute-pascal-online

The code is below:

program quadratic;

var a,b,c : real;

delta, x1, x2 : real;

begin

writeln('Provide equation data: ');

write( 'A='); readln(a);

write( 'B='); readln(b);

write( 'C='); readln(c);

delta:= sqr(b)-4*a*c;

if delta<0 then

writeln( 'No real roots')

else

if delta=0 then

begin

x1:=-b/(2*a);

write( 'Equation has one root: ' ,x1);

end

else

begin

x1:=(-b-sqrt(delta))/(2*a);

x2:=(-b+sqrt(delta))/(2*a);

write('Roots: X1=' ,x1, ' X2+' ,x2);

end;

readln;

end.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

More Books

Students also viewed these Databases questions