SlideShare une entreprise Scribd logo
1  sur  1
Télécharger pour lire hors ligne
SOLVE WITHOUT UISNG IF-ELSE STATEMENT PLEASE IF POSSIBLE.
Write a C + + program that reads from the user the coefficients of a quadratic equation (a, b, and
c). The program should find and display the roots ( r 1 and r 2 ) of the quadratic equation.
Assume the coefficients input by the user are valid. The quadratic equation: ax x 2 + bx + c = 0
The user should input the values of a , b , and c The program should find and display the roots r l
and r 2 : r 1 = 2 a b + b 2 4 a c r 2 = 2 a b b 2 4 a c

Contenu connexe

Plus de aksahnan

Situation of facts- Management of conflict situations in the labor are.pdf
Situation of facts- Management of conflict situations in the labor are.pdfSituation of facts- Management of conflict situations in the labor are.pdf
Situation of facts- Management of conflict situations in the labor are.pdf
aksahnan
 
Solve using Java programming language- ----------------------------.pdf
Solve using Java programming language-   ----------------------------.pdfSolve using Java programming language-   ----------------------------.pdf
Solve using Java programming language- ----------------------------.pdf
aksahnan
 

Plus de aksahnan (20)

sin(4) in tili 10 sie 30.pdf
sin(4) in tili 10 sie 30.pdfsin(4) in tili 10 sie 30.pdf
sin(4) in tili 10 sie 30.pdf
 
Simulate on a vertical time axis (with events labeled with the senders.pdf
Simulate on a vertical time axis (with events labeled with the senders.pdfSimulate on a vertical time axis (with events labeled with the senders.pdf
Simulate on a vertical time axis (with events labeled with the senders.pdf
 
Singay Copportion hes recorded the following costs for tho vi 101- Toa.pdf
Singay Copportion hes recorded the following costs for tho vi 101- Toa.pdfSingay Copportion hes recorded the following costs for tho vi 101- Toa.pdf
Singay Copportion hes recorded the following costs for tho vi 101- Toa.pdf
 
Since the cell making cortisol has a high concentration of cortisol co.pdf
Since the cell making cortisol has a high concentration of cortisol co.pdfSince the cell making cortisol has a high concentration of cortisol co.pdf
Since the cell making cortisol has a high concentration of cortisol co.pdf
 
sinckA A nak-ereme inreiter atoud cheose kince it offere.pdf
sinckA A nak-ereme inreiter atoud cheose  kince it offere.pdfsinckA A nak-ereme inreiter atoud cheose  kince it offere.pdf
sinckA A nak-ereme inreiter atoud cheose kince it offere.pdf
 
Since dinosaur cannot swim- explain how a fossil can be found on all c.pdf
Since dinosaur cannot swim- explain how a fossil can be found on all c.pdfSince dinosaur cannot swim- explain how a fossil can be found on all c.pdf
Since dinosaur cannot swim- explain how a fossil can be found on all c.pdf
 
Simulate the SOP expression- f(W-X-Y-Z)-m(1-2-4-5-6-9-12-14).pdf
Simulate the SOP expression- f(W-X-Y-Z)-m(1-2-4-5-6-9-12-14).pdfSimulate the SOP expression- f(W-X-Y-Z)-m(1-2-4-5-6-9-12-14).pdf
Simulate the SOP expression- f(W-X-Y-Z)-m(1-2-4-5-6-9-12-14).pdf
 
SIMs media is specially designed to detect three distinct metabolic pr.pdf
SIMs media is specially designed to detect three distinct metabolic pr.pdfSIMs media is specially designed to detect three distinct metabolic pr.pdf
SIMs media is specially designed to detect three distinct metabolic pr.pdf
 
Simulate differential equation dt2d2y-12dtdy5y Simulate the SIR model.pdf
Simulate differential equation dt2d2y-12dtdy5y Simulate the SIR model.pdfSimulate differential equation dt2d2y-12dtdy5y Simulate the SIR model.pdf
Simulate differential equation dt2d2y-12dtdy5y Simulate the SIR model.pdf
 
Simple Stains are an indirect staining process most widely used differ.pdf
Simple Stains are an indirect staining process most widely used differ.pdfSimple Stains are an indirect staining process most widely used differ.pdf
Simple Stains are an indirect staining process most widely used differ.pdf
 
Situation of facts- Management of conflict situations in the labor are.pdf
Situation of facts- Management of conflict situations in the labor are.pdfSituation of facts- Management of conflict situations in the labor are.pdf
Situation of facts- Management of conflict situations in the labor are.pdf
 
Sigma factors recognize the Pribnow Box and the consensus sequence in.pdf
Sigma factors recognize the Pribnow Box and the consensus sequence in.pdfSigma factors recognize the Pribnow Box and the consensus sequence in.pdf
Sigma factors recognize the Pribnow Box and the consensus sequence in.pdf
 
Some G-protein receptor systems are associated with a protein known as.pdf
Some G-protein receptor systems are associated with a protein known as.pdfSome G-protein receptor systems are associated with a protein known as.pdf
Some G-protein receptor systems are associated with a protein known as.pdf
 
Single acyl chain lipids that can act as detergents are most likely to (1).pdf
Single acyl chain lipids that can act as detergents are most likely to (1).pdfSingle acyl chain lipids that can act as detergents are most likely to (1).pdf
Single acyl chain lipids that can act as detergents are most likely to (1).pdf
 
Some analysts break down IDS models even further into four categories.pdf
Some analysts break down IDS models even further into four categories.pdfSome analysts break down IDS models even further into four categories.pdf
Some analysts break down IDS models even further into four categories.pdf
 
Solve- 34x-12.pdf
Solve- 34x-12.pdfSolve- 34x-12.pdf
Solve- 34x-12.pdf
 
Solve with PL-SQL - 2- List number of customers with their total purch.pdf
Solve with PL-SQL - 2- List number of customers with their total purch.pdfSolve with PL-SQL - 2- List number of customers with their total purch.pdf
Solve with PL-SQL - 2- List number of customers with their total purch.pdf
 
solve with solutions solve with solutions Find all minimum SoP expre.pdf
solve with solutions  solve with solutions  Find all minimum SoP expre.pdfsolve with solutions  solve with solutions  Find all minimum SoP expre.pdf
solve with solutions solve with solutions Find all minimum SoP expre.pdf
 
Solve using python- Append function not allowed public elass Node f.pdf
Solve using python- Append function not allowed   public elass Node f.pdfSolve using python- Append function not allowed   public elass Node f.pdf
Solve using python- Append function not allowed public elass Node f.pdf
 
Solve using Java programming language- ----------------------------.pdf
Solve using Java programming language-   ----------------------------.pdfSolve using Java programming language-   ----------------------------.pdf
Solve using Java programming language- ----------------------------.pdf
 

Dernier

Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Dernier (20)

Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

SOLVE WITHOUT UISNG IF-ELSE STATEMENT PLEASE IF POSSIBLE- Write a C.pdf

  • 1. SOLVE WITHOUT UISNG IF-ELSE STATEMENT PLEASE IF POSSIBLE. Write a C + + program that reads from the user the coefficients of a quadratic equation (a, b, and c). The program should find and display the roots ( r 1 and r 2 ) of the quadratic equation. Assume the coefficients input by the user are valid. The quadratic equation: ax x 2 + bx + c = 0 The user should input the values of a , b , and c The program should find and display the roots r l and r 2 : r 1 = 2 a b + b 2 4 a c r 2 = 2 a b b 2 4 a c