A) x2-5x-14=0 tenglamani ildizlari topish dasturiy kodi va blok-sxemasi tuzilsin.
#include
#include
using namespace std;
int main () {
int a,b,c;
float x1, x2, D;
cout<<"a ni kiriting"<> a;
cout<<"b ni kiriting"<> b;
cout<<"c ni kiriting"<> c;
D=(b*b-4*a*c)/(2*a);
if (D>0) {
x1=(-b)+sqrt*(D))/(2*a);
x2=(-b)-sqrt*(D))/(2*a);
cout<<"X1="<
cout<<"X2="<
}
else if (D==0){
x1=(-b)/(2*a);
x1=x2;
cout<<"x="<}
else {
cout<<"Tenglama yechimga ega emas"<
}
}
return 0;
Boshlash
Kiritish a,b,c
D=(b*b-4*a*c)/(2*a);
x1=(- b)+sqrt*(D))/(2*a)
x2=(-b)-sqrt*(D))/(2*a)
Tamom
B) Kvadratning tomoni a berilgan. Uning perimetri aniqlansin. P=4*a
Do'stlaringiz bilan baham: |