#include <cstdlib>
#include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
int main ()
{
double a, b, c, delta, x1, x2;
cin>>a>>b>>c;
delta=b*b-4*a*c;
if (delta<0) cout <<"Brak pierwiastkow";
if (delta==0)
{
x1=-b/ (2*a);
cout<<"x="<<x1;
}
if (delta>0)
{
x1=(-b-sqrt(delta))/(2*a);
x2=(-b+sqrt(delta))/(2*a);
cout<<"x1="<<x1<<"x2"<<x2;
}
return 0;
}
#include <iostream>
#include <math.h>
#include <cstdio>
using namespace std;
int main ()
{
double a, b, c, delta, x1, x2;
cin>>a>>b>>c;
delta=b*b-4*a*c;
if (delta<0) cout <<"Brak pierwiastkow";
if (delta==0)
{
x1=-b/ (2*a);
cout<<"x="<<x1;
}
if (delta>0)
{
x1=(-b-sqrt(delta))/(2*a);
x2=(-b+sqrt(delta))/(2*a);
cout<<"x1="<<x1<<"x2"<<x2;
}
return 0;
}
moje pytanie jest, czy ogarnie gdzieś sobie książkę/stronę z konkretnymi podstawami i przejrzyście wytłumaczonymi rzeczami? mój pan od infy w sumie ogarnia wszystko i tłumaczy krok po kroku, ale chciałbym ruszyć trochę szybciej xd
Zakładki