मराठी
तामिळनाडू बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान इयत्ता ११

Suppose you want to solve the quadratic equation ax2 + bx + c = 0 by an algorithm. quadratic_solve (a, b, c) -- inputs:? -- outputs:? You intend to use the formula and you are prepared - Computer Science

Advertisements
Advertisements

प्रश्न

Suppose you want to solve the quadratic equation ax2 + bx + c = 0 by an algorithm.

quadratic_solve (a, b, c)

-- inputs:?

-- outputs:?

You intend to use the formula and you are prepared to handle only real number roots. Write a suitable specification.

x = `(-b ± sqrt(b^2) - 4ac)/(2a)`

टीपा लिहा

उत्तर

  1. Quadratic – solve (a, b, c)
  2. – – inputs: b2 – 4 ac > = 0 where a, b, c are real numbers, a ≠ 0
  3. – – outputs: and x2 are real numbers such that a(x1)2 + bx1 + c = 0 and a(x2)2 + bx2 + c = 0
shaalaa.com
Algorithmic Problems
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 6: Specification and Abstraction - Evaluation - Section - D [पृष्ठ ८७]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 11 TN Board
पाठ 6 Specification and Abstraction
Evaluation - Section - D | Q 2. | पृष्ठ ८७
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×