Programming C++
Hasil Output Program Menentukan Suatu Nilai Benar Atau Salah |
1. Buka Atau Open Turbo C++ Atau Borland
2. Pilih File => New
3. Lalu Ketikkan Syntax C++ Berikut Pada Gambar Atau Syntax Higlighter
- #include<iostream.h>
- #include<conio.h>
- void main(){
- int nilai1, nilai2, nilai3, nilai4, nilai5;
- nilai1 = (5<1) && (3==3);
- nilai2 = (3!=2);
- nilai3 = (7>10) || (3<5);
- nilai4 = (6==6) && (7==7);
- nilai5 = !(3!=2);
- cout<<"Nilai 1 = "<<nilai1<<endl;
- cout<<"Nilai 2 = "<<nilai2<<endl;
- cout<<"Nilai 3 = "<<nilai3<<endl;
- cout<<"Nilai 4 = "<<nilai4<<endl;
- cout<<"Nilai 5 = "<<nilai5<<endl;
- }
0 comments:
Post a Comment