Open Andy179176 opened 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
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 '.'
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
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
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.
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.)
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.