Advertisement
sergAccount

Untitled

Dec 5th, 2020
663
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.22 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package ja5;
  7.  
  8. /**
  9.  *
  10.  * @author Administrator
  11.  */
  12. public class JA5 {
  13.  
  14.     /**
  15.      * @param args the command line arguments
  16.      */
  17.     public static void main(String[] args) {
  18.         // TODO code application logic here
  19.         // Операторы управления
  20.         // 1) if-else (условный оператор)
  21.         // Условный оператор позволяет выполнить код в зависимости от условия
  22.         if(20>10){
  23.             System.out.println("20 больше 10");
  24.         }
  25.         //
  26.         int a = 100;
  27.         int b = 200;
  28.         if(b>a){
  29.             System.out.println("b больше чем a");
  30.         }        
  31.         // использование необязательной конструкции else
  32.         if(a>b){
  33.             System.out.println("a>b");
  34.             System.out.println("!!!!!!!!!!");
  35.         }else{
  36.             System.out.println("a<=b");
  37.             System.out.println("OKKKKKKKKKKKKK");
  38.         }        
  39.     }
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement