Tugas3.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; int main() { float a, b, c, d, e, f, x=8, y=9; a = x == y; b = x != y; c = x > y; d = x < y; e = x >= y; f = x <= y; puts("=================================="); puts(" Contoh Operator Perbandingan "); puts("=================================="); cout <<"Masukan Nilai x adalah \t: \n"; scanf("%d",&x); cout <<"Masukan Nilai y adalah \t: \n"; scanf("%d",&y); puts("=================================="); cout <<"Nilai x adalah \t\t: "<<x<<endl;; cout <<"Nilai y adalah \t\t: "<<y<<endl; puts("=================================="); cout<<"Hasil dari 8 == 9 \t: " << a <<endl; cout<<"Hasil dari 8 != 9 \t: " << b <<endl; cout<<"Hasil dari 8 > 9 \t: " << c <<endl; cout<<"Hasil dari 8 < 9 \t: " << d <<endl; cout<<"Hasil dari 8 >= 9 \t: " << e <<endl; cout<<"Hasil dari 8 <= 9 \t: " << f <<endl; puts("=================================="); puts("Nama \t: Muhammad Hikmal Faturrahman"); puts("NIM \t: 1620230001"); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines