Paste
Pasted as C++ by registered user xujiayu ( 5 years ago )
#include <stdio.h>
#include <conio.h>
// giai phuong trinh bac 1
int main()
{
float a,b;
//buoc 1 nhap a va b
printf("\nnhap a : ");
scanf ("%f",&a);
printf("\nnhap b : ");
scanf("%f",&b);
//buoc 2 xu ly
if(a == 0)
{
if(b == 0)
{
printf("\nvo so nghiem");
}
else
{
printf("\nvo nghiem");
}
}
else
{
float x = -b / a;
printf("\npt co nghiem x = %f",x);
}
getch();
return 0;
}
Revise this Paste
Parent: 116981
Children: 116983