answersLogoWhite

0


Best Answer

Identification division.

Program-id. Quadratic.

Environment division.

Data division.

Working-storage section.

01 a pic 9(3) value 0.

01 b pic 9(3) value 0.

01 c pic 9(3) value 0.

01 d pic 9(3) value 0.

01 e pic 9(3) value 0.

01 f pic 9(3) value 0.

01 g pic 9(3) value 0.

01 h pic 9(3) value 0.

01 x1 pic 9(3) value 0.

01 x pic z(3).z(2) value 0.

01 x2 pic 9(3) value 0.

01 y pic z(3).z(2) value 0.

Procedure division.

Display "Written by Martin O. Egua, but not complete".

Display "Quadratic equation solver for three values a, b & c"

Display "Enter a number: " Accept a.

Display "Enter the second number: " Accept b.

Display "Enter the last number: " Accept c.

compute d = (b * b)

compute e = 4 * a * c

compute f = 2 * a

compute g = d - e

compute h = function sqrt (g).

compute x1 = (-b) + h

compute x = x1 / f

Display "X = " x

compute x2 = (-b) - h

compute y = x2 / f

Display "Y = " y

Display "Send the accurate program".

Stop run.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
User Avatar

monday oche

Lvl 1
1y ago
The Ans is useful

Add your answer:

Earn +20 pts
Q: Write the full program for the quadratic equation in COBOL?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Write a program to find the square root of the quadratic equation using flow chart?

You don't need a flow chart for that; just use the quadratic formula directly; most programming languages have a square root function or method. You would only need to do this in many small steps if you use Assembly programming. The formulae would be something like this: x1 = (-b + sqrt(b^2 - 4*a*c)) / (2 * a) and x2 = (-b - sqrt(b^2 - 4*a*c)) / (2 * a) where a, b, and c are the coefficients of the quadratic equation in standard form, and x1 and x2 are the solutions you want.


What is COBOL coding sheet?

1-6 sequence numbers. 7 (*) for comment (-) for continue (D) for debugging. 8-11 called as Area-A in this Area we can write Divisions,Paragraphs,sections,Level numbers. 12-72 called as Area-B in this area we can write cobol executable statements like select,accept,display. 73-80 is ignored area by compiler but we can see in source Listing.


What does it mean to evaluate cobol?

The word evaluate in the programming language COBOL can be used to replace a nested if statement. Instead of long statement evaluate allows one to shorten the coding required and write cleaner code.


Write a c program to determine whether a matrix is singular or not?

A c program is also known as a computer program. A singular matrix has no inverse. An equation to determine this would be a/c=f. <<>> The determinant of a singular matix is zero.


What is the difference between MF Cobol and Mainframe Cobol?

It depends on the target platform. If you want to use MF COBOL on the mainframe then the answer is none, MF supports the mainframe as a target by using MF EEE. You write and unit test the code on the PC and then send the source off to the mainframe for compilation and final testing.

Related questions

Write an algorithm to find the root of quadratic equation?

Write an algorithm to find the root of quadratic equation


Algorithm to find the roots of a quadratic equation?

The easiest way to write a generic algorithm is to simply use the quadratic formula. If it is a computer program, ask the user for the coefficients a, b, and c of the generic equation ax2 + bx + c = 0, then just replace them in the quadratic formula.


How did you write each quadratic equation in standard form?

readuse the answer


How do you write a poem on the roots of the quadratic equation?

2000X=Y2KoverZzz?


Write a program in C programming language that computes the roots of the quadratic equation ax2 plus bx plus c?

Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you.


How would you go about solving a quadratic equation?

Write the quadratic equation in the form ax2 + bx + c = 0 then the roots (solutions) of the equation are: [-b ± √(b2 - 4*a*c)]/(2*a)


How do you write a pseudo code for find the quadratic equation?

computer scince


How do you write a quadratic equation in standard form?

ax2 + bx + c


When the roots are equal of a quadratic equation?

Write the quadratic equation in the form ax2 + bx + c = 0 The roots are equal if and only if b2 - 4ac = 0. The expression, b2-4ac is called the [quadratic] discriminant.


Write an algorithm and draw a flowchart that will calculate the roots of quadratic equation?

dejene


What are all the ways you can solve a quadratic equation?

First, write the equation in standard form, i.e., put zero on the right. Then, depending on the case, you may have the following options:Factor the polynomialComplete the squareUse the quadratic formula


What is the quadratic equation for solutions 11 and 3?

Just write the equation as: (x - 11)(x - 3) = 0 and convert it to any form you like.