[ create a new paste ] login | about

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

C, pasted on Apr 26:
#include<stdio.h>
#include<conio.h>
int main(){

	int a, b;
	printf("\nNhap vao a = ");
	scanf_s("%d", &a);

	printf("\nNhap vao b = ");
	scanf_s("%d", &b);

	if (a == 0){  // PT có dạng b = 0
		if (b == 0){    // PT có dạng 0 = 0
			printf("\nPT co vo so nghiem ");
		}
		else{
			printf("\nPT vo nghiem ");
		}
	}
	else{
		float x = (float)-b / a;
		printf("\nPT co nghiem x = %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: