Tugas3.2

Run Settings
LanguageC++
Language Version
Run Command
#include <iostream> using namespace std; //Nama : Nagita Elsa //Nim : 3420230016 int main() { puts("=========================================="); puts(" Contoh Operator Perbandingan "); puts("=========================================="); float a,b,c,d,e,f, x=8, y=9; cout<<"masukan nilai x \t: "; cin>>x; cout<<"\nMasukan nilai y \t: "; cin>>y; cout<<endl; puts("=========================================="); cout<<"Nilai x adalah \t\t: "<<x<<endl; cout<<"Nilai y adalah \t\t: "<<y<<endl; a = x == y; b = x != y; c = x > y; d = x < y; e = x >= y; f = x <= y; puts("=========================================="); cout << "Hasil dari 8 == 9 : " <<a<<endl; cout << "Hasil dar 8 != 9 : " <<b<<endl; cout << "Hasil dar 8 > 9 : " <<c<<endl; cout << "Hasil dar 8 < 9 : " <<d<<endl; cout << "Hasil dar 8 >= 9 : " <<e<<endl; cout << "Hasil dar 8 <= 9 : " <<f<<endl; puts("=========================================="); puts("Nama :Nagita Elsa Saputri"); puts("Mobile : 088223933890"); return 0; }
Editor Settings
Theme
Key bindings
Full width
Lines