Guest User

Untitled

a guest
Nov 16th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. main(){
  3. float x;
  4. int a,b;
  5. printf("Nhap vao a:");
  6. scanf("%d",&a);
  7. printf("Nhap vao b:");
  8. scanf("%d",&b);
  9. if(a==0){
  10. printf("Phuong trinh vo nghiem");
  11. }
  12. if(b==0){
  13. printf("Phuong trinh vo so nghiem");
  14. }
  15. if(a!=0&&b!=00){
  16. x=(float(-b))/(float(a));
  17. printf("Phuong trinh %dx+%d=0 co nghiem la:%0.2f",a,b,x);
  18. }
  19. }
Add Comment
Please, Sign In to add comment