-
-
Save rkhang7/ab600a8426c89b10d4ad90a46831920a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// giai pt ax+b=0 | |
#include <stdio.h> | |
int main() | |
{ | |
int a,b; | |
printf("a=");scanf("%d",&a); | |
printf("b=");scanf("%d",&b); | |
if(a==0&&b==0) printf("PT co vo so nghiem"); | |
if(a==0&&b!=0) printf("PT vo nghiem"); | |
if(a!=0&&b!=0) printf("PT co nghiem la %f",float(-b)/a); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment