Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- #include<iostream>
- using namespace std;
- main()
- {
- float a, b, c, d, e, f, x, y;
- cout<<"masukan nilai X = ";
- cin>>x;
- cout<<"masukan nilai Y = ";
- cin>>y;
- a = x == y;
- b = x != y;
- c = x > y;
- d = x < y;
- e = x >= y;
- f = x <= y;
- cout<<endl;
- cout<<"Hasil dari "<<x<<" == "<<y<<" = "<<a<<endl;
- cout<<"Hasil dari "<<x<<" != "<<y<<" = "<<b<<endl;
- cout<<"Hasil dari "<<x<<" > "<<y<<" = "<<c<<endl;
- cout<<"Hasil dari "<<x<<" < "<<y<<" = "<<d<<endl;
- cout<<"Hasil dari "<<x<<" >= "<<y<<" = "<<e<<endl;
- cout<<"Hasil dari "<<x<<" <= "<<y<<" = "<<f<<endl;
- getch();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement