Viet chuong trinh pascal giai phuong trinh ax+b=0 02/08/2021 Bởi Everleigh Viet chuong trinh pascal giai phuong trinh ax+b=0
Program GIAI_PHUONG_TRINH_BAC_NHAT; Uses crt; Var a,b,x: real; BEGIN Clrscr; Writeln(‘GIAI PHUONG TRINH BAC NHAT: AX + B=0’); Writeln(‘Nhap a = ‘); readln(a); Writeln(‘Nhap b= ‘); readln(b); If a=0 then If(b=0) then Writeln(‘ Phuong trinh co vo so nghiem’) Else writeln(‘ Phuong tring vo nghiem’) Else Writeln(‘Phuong trinh co nghiem x=’,-b/a: 4: 2); Readln; END. Bình luận
Program GIAI_PHUONG_TRINH_BAC_NHAT;
Uses crt;
Var a,b,x: real;
BEGIN
Clrscr;
Writeln(‘GIAI PHUONG TRINH BAC NHAT: AX + B=0’);
Writeln(‘Nhap a = ‘); readln(a);
Writeln(‘Nhap b= ‘); readln(b);
If a=0 then If(b=0) then Writeln(‘ Phuong trinh co vo so nghiem’)
Else writeln(‘ Phuong tring vo nghiem’)
Else Writeln(‘Phuong trinh co nghiem x=’,-b/a: 4: 2);
Readln;
END.