import java.util.Random;
public class Test {
public static void main ( String args []) {
int max = 0;
int [] mas = new int [10];
Random rand = new Random();
for (int i = 0; i < 10 ; i++) {
mas[i] = rand.nextInt( 33 +1 );
while ( mas[i] < 7 || mas[i] > 33) {
mas[i] = rand.nextInt( 33 +1 );
}
}
for (int i = 0; i < 10 ; i++) {
System.out.print(mas[i] + " ");
}
System.out.println();
for(int i = 0; i < mas.length - 1; i++) {
if ( max < mas[i] ) max = mas[i];
}
System.out.println(max);
}
}
def translation_of_lengths(n, m):
inch = 2.54
if m == 'duim':
print("{} inch = {}cm ".format(n, (n * inch)))
if m == 'cm':
print("{} cm = {} inch ".format(n, (round(n / inch, 2
translation_of_lengths(5, 'duim')
translation_of_lengths(120, 'cm')
def even_numbers(s):
s_mas = s.split()
if len(s_mas) != 6:
print("\tYou have entered not 6 numbers!")
print(s_mas)
else:
x = sum(int(i) for i in s_mas if int(i) >= 0 if int(i) % 2 == 0)
print("The sum of even numbers {}".format(x))
a = input("Numbers: ")
even_numbers(a)
def procent(x, y):
print('{}% from the number {} = {}'.format(x, y, (x / 100) * y))
procent(55, 120)