vstoyanov

Оператори и Изрази 3зад

May 12th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.33 KB | None | 0 0
  1. public class Main {
  2.  
  3.     public static void main(String[] args) {
  4.         int number=4752;
  5.         boolean is7onThirdPlace=false;
  6.  
  7.         int secondNumber=number/100;
  8.  
  9.         if(secondNumber%10==7)
  10.  
  11.  
  12.         {
  13.  
  14.  
  15.             is7onThirdPlace=true;
  16.         }
  17.  
  18.         System.out.println(is7onThirdPlace);
  19.  
  20.  
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment