From c3410721179a1a56402effb65f72390fdf4c88fe Mon Sep 17 00:00:00 2001 From: Patrick Gutemberg <84359525+Patick-gu@users.noreply.github.com> Date: Thu, 5 Oct 2023 22:25:45 -0300 Subject: [PATCH] BHASKARA Resolvido MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Código resolvido com muito ódio. --- baskhara.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/baskhara.cpp b/baskhara.cpp index 1ce2871..ae2f51a 100644 --- a/baskhara.cpp +++ b/baskhara.cpp @@ -1,27 +1,27 @@ #include #include +#include using namespace std; int main(){ - double A; - double B; - double C; + double A,B,C; cin>>A>>B>>C; - double regra1= B*B; - double regra2= A*C; - double regra3= regra2 * 4; - double delta= regra1-regra3; + double delta= (B*B)-(4*(A*C)); double raiz = sqrt(delta); double div= 2*A; - double tratamento = -(B); - double div1= raiz/div; - double resultado1 = tratamento-div1; - double resultado2 = tratamento+div1; - cout<<"delta igual a = "<