Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- && -> "и" (and)
- || -> "Или" (or)
- ////////////ЛОГИЧЕСКО "И"///////////////////
- public class AndOr {
- public static void main(String[] args) {
- boolean door1 = true;
- boolean door2 = true;
- if (door1 == true && door2 == true){ // &&
- System.out.println("Pesho izbqga");
- } else {
- System.out.println("Pesho e tup");
- }
- }
- }
- //////////////////ЛОГИЧЕСКО "ИЛИ"//////////////////////
- public class AndOr {
- public static void main(String[] args) {
- boolean door1 = true;
- boolean door2 = true;
- if (door1 == true || door2 == true){ // ||
- System.out.println("Pesho izbqga");
- } else {
- System.out.println("Pesho e tup");
- }
- }
- }
- //////////////////Домашно//////////////
- Калкулатор
- /*
- 9 9 9
- 7 7 7
- + - *
- ---- ---- ---
- 16 2 63
- */
Advertisement
Add Comment
Please, Sign In to add comment