5.10.10
Operator
Operator Relasi
# include
# include
main()
{
int a=20,b=20,sama1,tidaksama1,besar1,samabesar1,kecil1,samakecil1;
float x=30.25,y=25.30,sama2,tidaksama2,besar2,samabesar2,kecil2,samakecil2;
clrscr();
cout <<"\n*******************";
cout <<"\n* OPERATOR RELASi *";
cout <<"\n*******************";
cout <<"\n\n";
cout <<"\n a = "< 1
sama2 = (x == y); //false -> 0
cout <<"\n a = b = " < 0
tidaksama2 = (x != y); //true -> 1
cout <<"\n a != b = " < b); //false -> 0
besar2 = (x > y); //true -> 1
cout <<"\n a > b = " < y = " <= b); //true -> 1
samabesar2 = (x >= y); //true -> 1
cout <<"\n a >= b = " <= y = " < 0
kecil2 = (x < y); //false -> 0
cout <<"\n a < b = " < 1
samakecil2 = (x <= y); //false -> 0
cout <<"\n a <= b = " <
Langganan:
Posting Komentar (Atom)
Pengikut
Entri Populer
-
Metoda Pengurutan Quick Sort Dengan Bahasa C Roni akan membangun program yang akan melakukan proses pengurutan dengan metoda Quick Sort. ...
-
Pencarian Berurutan Adalah suatu teknik pencarian data dalam array (1 dimensi)yang akan menelusuri semua elemen-elemen array dari awal sa...
-
#include #include #include #define maks 5 using namespace std; class Queue{ friend ostream& operator
-
#include > #include #include using namespace std ; class node { friend class list; friend ostream& operator public: n...
-
Menghitung Rata-Rata untuk program Kelas: Private Sub CalcBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Calc...
-
6. class Stack { 7. friend ostream& operator<<(ostream&,const Stack&); 8. public: 9. Stack(); 10. ...
-
Operator Relasi # include # include main() { int a=20,b=20,sama1,tidaksama1,besar1,samabesar1,kecil1,samakecil1; float x=30.25,...
-
#include #include template using namespace std; class Kompleks { friend class operasi ; friend ostream& operator &); frie...
Tidak ada komentar:
Posting Komentar