[ create a new paste ] login | about

Link: http://codepad.org/Tpd4Bydg    [ raw code | output | fork ]

C, pasted on Sep 6:
#include<stdio.h>
#include<conio.h>

int main()
{
	float a, b;
	float x;
	printf("\nNhap a: ");
	scanf("%f", &a);
	printf("\nNhap b: ");
	scanf("%f", &b);

	if(a == 0)
	{
		if(b == 0)
			printf("\nPT co vo so nghiem");
		else
			printf("\nPT vo nghiem");
	}
	else
	{
		x = -b / a;
	printf("\nPT co 1 nghiem la %f", x);
	}
	getch();
	return 0;

}


Output:
1
Line 17: error: conio.h: No such file or directory


Create a new paste based on this one


Comments: