var
k: integer;
begin
readln(k);
if k< 0 then
writeln('не может такого быть')
else
write('мы нашли в лесу ',k,' гриб');
if (k mod 100 in [5..19]) then
writeln('ов')
else if (k mod 10 in [2..4]) then
writeln('а')
else if (k mod 10=1) then
writeln
writeln('ов');
end;
end.
java
import java.util.random;
public class myapp{
public static void main (string {
random rand = new random();
int n = rand.nextint(50);
int [] arr = new int[n];
for(int i = 0; i < n; i++) {
int j = rand.nextint(50);
arr[i] = j;
}
for( int i = 0; i < n; i++) {
if ( arr[i] % 2 == 0 ) {
system.out.print(arr[i] + " ");
pascal
program myapp;
i, n , j: integer;
arr: array of integer;
randomize;
n : = random(50);
setlength(arr, n);
for i: = 0 to n do
j: = random(50);
arr[i]: = j;
if( arr[i] mod 2 = 0 ) then
write(arr[i], ' ');
var
k: integer;
begin
readln(k);
if k< 0 then
writeln('не может такого быть')
else
begin
write('мы нашли в лесу ',k,' гриб');
if (k mod 100 in [5..19]) then
writeln('ов')
else if (k mod 10 in [2..4]) then
writeln('а')
else if (k mod 10=1) then
writeln
else
writeln('ов');
end;
end.
java
import java.util.random;
public class myapp{
public static void main (string {
random rand = new random();
int n = rand.nextint(50);
int [] arr = new int[n];
for(int i = 0; i < n; i++) {
int j = rand.nextint(50);
arr[i] = j;
}
for( int i = 0; i < n; i++) {
if ( arr[i] % 2 == 0 ) {
system.out.print(arr[i] + " ");
}
}
}
}
pascal
program myapp;
var
i, n , j: integer;
arr: array of integer;
begin
randomize;
n : = random(50);
setlength(arr, n);
for i: = 0 to n do
begin
j: = random(50);
arr[i]: = j;
end;
for i: = 0 to n do
begin
if( arr[i] mod 2 = 0 ) then
begin
write(arr[i], ' ');
end;
end;
end.