Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<conio.h>
  3. #include<iostream>
  4. using namespace std;
  5.  
  6. main()
  7. {
  8. float a, b, c, d, e, f, x, y;
  9. cout<<"masukan nilai X = ";
  10. cin>>x;
  11. cout<<"masukan nilai Y = ";
  12. cin>>y;
  13. a = x == y;
  14. b = x != y;
  15. c = x > y;
  16. d = x < y;
  17. e = x >= y;
  18. f = x <= y;
  19. cout<<endl;
  20. cout<<"Hasil dari "<<x<<" == "<<y<<" = "<<a<<endl;
  21. cout<<"Hasil dari "<<x<<" != "<<y<<" = "<<b<<endl;
  22. cout<<"Hasil dari "<<x<<" > "<<y<<" = "<<c<<endl;
  23. cout<<"Hasil dari "<<x<<" < "<<y<<" = "<<d<<endl;
  24. cout<<"Hasil dari "<<x<<" >= "<<y<<" = "<<e<<endl;
  25. cout<<"Hasil dari "<<x<<" <= "<<y<<" = "<<f<<endl;
  26. getch();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement