Question
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
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