हिंदी
तमिलनाडु बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान कक्षा ११

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×