tel-ran-de / 26-27-morning-basic

# Group 26/27-Morning Repository 1. From the drop-down menu, choose a lesson. 2. Homework in issue.
4 stars 0 forks source link

JAVA 2022-02-15 #15

Open Andy179176 opened 2 years ago

Andy179176 commented 2 years ago
  1. Implement the program that checks if one integer is divisible by another integer without any remainder or not. (Hint: Use the modulo (%) operator in Java. The % operator that returns the remainder of two integers. For example 17%3 is 2 because 17 divided by 3 leaves a remainder of 2, but 15%3 is 0). Print the result in the main method. Examples: (10,2) -> true (10,3) -> false

  2. Let’s imagine that we have a device, which has two flasks. The device works correct if temperature of the first flask is above 100 degrees and the temperature of the second flask is less than 100 degree. You should write the program that checks this device. You should write the program that checks the device. Your program has to variables temperature1 and temperature2. As a result it prints the message true or false.

  3. The conditions of this task is the same like the previous task but the device works correct if temperature of the one of the flasks is above 150 degrees and the temperature of the another flask is less than 0 degree. (NOTE! The first flask’s temperature may be above 150 or less 150 then the second flask’s temperature is less 0 or above 0 respectively.)

  4. The conditions of this task are the same like the previous task but our device has three flasks. The device works correct if only one of the flasks has a temperature less than 0 and two others has a temperature above 0 and different each other.

jannametz commented 2 years ago

You write that we should use int data type. but in the example there is a decimal point (double data type) What should we do ? Use int or Double

Andy179176 commented 2 years ago

You write that we should use int data type. but in the example there is a decimal point (double data type) What should we do ? Use int or Double If it is about the first task then there is no any double data type. In the example we have two integers separated by comma. If it was double number I should use '.'

pamirian commented 2 years ago

ДЗ: http://pamirian.com/java/homework/15022022/

Andy179176 commented 2 years ago

ДЗ: http://pamirian.com/java/homework/15022022/

NOTE! The first flask’s temperature may be above 150 or less 150 then the second flask’s temperature is less 0 or above 0 respectively! But in case of your code the device works correct only if the first temperature is above 150

SSmith82 commented 2 years ago

https://www.dropbox.com/s/xf03jpelgvo7wih/HomeWork%2015.02.22.txt?dl=0

ElenaL171 commented 2 years ago

https://drive.google.com/drive/folders/1yUN0POAiEUVlKIf00eJnuZmM3YghS0Fh?usp=sharing

Marina-Mironova commented 2 years ago

https://docs.google.com/document/d/1u71vo4tUxZtMxpe5so6yeelDeNszJamsXCHGCfibZLY/edit?usp=sharing