November 2018 1 11 Report

Dokończ przerabianie kodu aby cykalo w C++... Prosze fast :D

#include <iostream>;

using namespace std ;

int main()

{

cout<<"rownanie kwadratowe "<< endl;

cout <<"podaj wartosc a "<<endl;

cin>> a;

cout <<"podaj wartosc b" <<endl;

cin>>b;

cout <<"podaj wartosc c" <<endl;

cin>>c;

delta:=b*b-4*a*c;

if (delta== 0);

}

{cout<<"delta=0 wiec rownanie ma jedno rozwiazanie"<<endl;

cout <<"delta<0 wiec niema piergwiastkow"<<endl;

x1=(-b+sqrt(delta))/2*a;

x2=(-b-sqrt(delta))/2*a;

cout << "Pierwiastek x1: " << x1 <<", pierwiastek x2: " << x2;

}

return 0 ;

}


More Questions From This User See All

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.