#include <iostream>using namespace std; int main(){ int arr[20]; // Сколько хочешь, столько и ставь // Заполни как хочешь int score = 0; for (int i = 0; i < 20; i++){ if (arr[i] < 13){ score++; }; };}
JAVA
import java.util.*; import java.lang.*;
class { public static void main(String[] args){
Scanner sc = new Scanner(System.in); // то для ввода
int arr[] = new int[20]; // Сколько хочешь, столько и ставь // Заполни как хочешь int score = 0; for (int i = 0; i < 20; i++){if (arr[i] < 13){score++;}; } }
Var a : array [1..5, 1..5] of integer; i, j : integer; begin randomize; for i := 1 to 5 do begin for j := 1 to 5 do begin a[i, j] := random (1000); write (a[i, j], ' '); end; writeln; end; for i := 1 to 5 do for j := 1 to 5 do if i > j then a[i, j] := 1 else if j > i then a[i, j] := 0; for i := 1 to 5 do begin for j := 1 to 5 do write (a[i, j], ' '); writeln; end; end.
var a : array [1..4, 1..5] of integer; i, j, m, c : integer; begin randomize; m := 1000; for i := 1 to 4 do begin for j := 1 to 5 do begin a[i, j] := random (1000); if a[i, j] < m then m := a[i, j]; write (a[i, j], ' '); end; writeln; end; c := 0; for i := 1 to 4 do for j := 1 to 5 do if a[i, j] = m then c := c + 1; writeln (m, ' ', c); end.
var a : array [1..4, 1..4] of integer; i, j, p : integer; begin randomize; for i := 1 to 4 do begin for j := 1 to 4 do begin a[i, j] := random (10); write (a[i, j], ' '); end; writeln; end; p := 1; for i := 1 to 4 do begin if a[i, i] <> 0 then p := p * a[i, i]; if a[i, 5 - i] <> 0 then p := p * a[i, 5 - i]; end; writeln (p); end.
#include <iostream>using namespace std;
int main(){ int arr[20]; // Сколько хочешь, столько и ставь // Заполни как хочешь int score = 0; for (int i = 0; i < 20; i++){ if (arr[i] < 13){ score++; }; };}
JAVA
import java.util.*;
import java.lang.*;
class {
public static void main(String[] args){
Scanner sc = new Scanner(System.in); // то для ввода
int arr[] = new int[20]; // Сколько хочешь, столько и ставь
// Заполни как хочешь
int score = 0;
for (int i = 0; i < 20; i++){if (arr[i] < 13){score++;};
}
}
a : array [1..5, 1..5] of integer;
i, j : integer;
begin
randomize;
for i := 1 to 5 do
begin
for j := 1 to 5 do
begin
a[i, j] := random (1000);
write (a[i, j], ' ');
end;
writeln;
end;
for i := 1 to 5 do
for j := 1 to 5 do
if i > j then a[i, j] := 1
else if j > i then a[i, j] := 0;
for i := 1 to 5 do
begin
for j := 1 to 5 do
write (a[i, j], ' ');
writeln;
end;
end.
var
a : array [1..4, 1..5] of integer;
i, j, m, c : integer;
begin
randomize;
m := 1000;
for i := 1 to 4 do
begin
for j := 1 to 5 do
begin
a[i, j] := random (1000);
if a[i, j] < m then m := a[i, j];
write (a[i, j], ' ');
end;
writeln;
end;
c := 0;
for i := 1 to 4 do
for j := 1 to 5 do
if a[i, j] = m then
c := c + 1;
writeln (m, ' ', c);
end.
var
a : array [1..4, 1..4] of integer;
i, j, p : integer;
begin
randomize;
for i := 1 to 4 do
begin
for j := 1 to 4 do
begin
a[i, j] := random (10);
write (a[i, j], ' ');
end;
writeln;
end;
p := 1;
for i := 1 to 4 do
begin
if a[i, i] <> 0 then p := p * a[i, i];
if a[i, 5 - i] <> 0 then p := p * a[i, 5 - i];
end;
writeln (p);
end.