Created
February 6, 2018 08:11
-
-
Save TranNgocMinh/fef029d214bcb092d5ce0ef476b38d15 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
while True: | |
a = int(raw_input("Nhap a=")) | |
b = int(raw_input("Nhap b=")) | |
if(a is 0): | |
print "Phuong trinh %dx + %d = 0 vo nghiem."%(a,b) | |
else: | |
x = -b/(a*1.0) | |
print "Phuong trinh %dx + %d = 0 co nghiem x = %.2f"%(a,b,x) | |
OK = raw_input("Ban co muon tiep tuc?(Y/N)") | |
if (OK is 'N'): | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment