Tugas3.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { int x, y; // Menampilkan judul cout << "==========================================" << endl; cout << "\tContoh Operator Perbandingan" << endl; cout << "==========================================" << endl; // Memasukkan nilai x dan y cout << "Masukan nilai x\t\t: " << endl; cin >> x; cout << "Masukan nilai y\t\t: " << endl; cin >> y; // Menampilkan nilai x dan y cout << "==========================================" << endl; cout << "Nilai x adalah\t\t: " << x << endl; cout << "Nilai y adalah\t\t: " << y << endl; cout << "==========================================" << endl; // Operasi perbandingan cout << "Hasil dari " << x << " == " << y << "\t: " << (x == y) << endl; cout << "Hasil dari " << x << " != " << y << "\t: " << (x != y) << endl; cout << "Hasil dari " << x << " > " << y << "\t: " << (x > y) << endl; cout << "Hasil dari " << x << " < " << y << "\t: " << (x < y) << endl; cout << "Hasil dari " << x << " >= " << y << "\t: " << (x >= y) << endl; cout << "Hasil dari " << x << " <= " << y << "\t: " << (x <= y) << endl; cout << "==========================================" << endl; // Menampilkan nama dan nomor telepon cout << "Nama\t: Muhammad Irfan Zidni" << endl; cout << "Mobile\t: 085819266473" << endl; return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines