It is necessary to check the three elements (second, third, fourth) of the array for compliance with the ranges at the same time
if array[1] < 1 || array[2] < 1 || array[3] < 1 { print("хотя бы один из элементов меньше 1") } else if array[1] == 1...10 || array[2] == 1...10 || array[3] == 1...10 { // ЭТА ЗАПИСЬ НЕ ПРАВИЛЬНАЯ!!!!!! КАК СОСТАВИТЬ ПРАВИЛЬНО???????? print("элементы от одного до десетяти") } else { print("элементы больше десяти") } I can not figure out, through switch, it is possible only to check one element of the array separately, but you need three at a time
The necessary conditions:
1- if at least one of the elements (second, third, fourth) or all three is less than one, then ...
2 — if at least two elements (in the second, third or fourth) are in the range from 1 to 10, and the remaining one is more than ten, or all in the range from 1 to 10, then ...
3 - if at least two elements (secondly, third or fourth) in the range of more than 10, and the remaining one in the range from 1 to 10, or all in the range of more than 10, then ...
если то..and you haveесли - иначе если- Sublihim