Разработчики игр на Unity, кто может ? При попытке начать билд игры на андроид вылетает такая ошибка:
UnityException: Android SDK is missing command-line tools.
Android SDK command-line tools component is not found. Make sure "Command-line Tools (latest)" is installed in the SDK manager.
If command-line tools are installed, but this message is still shown, please restart the Unity editor.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
объясните, что здесь не так, уже дня 3 вожусь с этой ошибкой!
const n=10;
var a:array[1..n] of integer;
max,min,imax,imin,s,i:integer;
begin
Randomize;
for i:=1 to n do begin
a[i]:=random(51);
write(a[i],' ');
end;
writeln;
max:=a[1]; imax:=1;
min:=a[1]; imin:=1;
for i:=1 to n do
begin
if a[i]>max then begin max:=a[i]; imax:=i; end;
if a[i]<min then begin min:=a[i]; imin:=i; end;
end;
writeln('max = ',max,' min = ',min);
s:=0;
if imax<imin
then for i:=imax to imin do s:=s+a[i]
else for i:=imin to imax do s:=s+a[i];
writeln('s = ',s);
end.
Пример:
38 15 4 5 9 15 24 40 12 9
max = 40 min = 4
s = 97
use strict;
use warnings;
use utf8;
my @vector;
my $vector_length = 100;
my $random_dia = 30000;
push @vector, int(rand($random_dia)) for(0..$vector_length);
my ($start, $end) = (undef, undef);
my ($min, $max, $sum) = ( $random_dia, 0, 0,);
for my $position (0.. $#vector)){
if($vector[$position] > $max ){
$max = $vector[$position];
$end= $position;
}
if($vector[$position] < $min ){
$min = $vector[$position];
$start= $position;
}
}
for my $position ($min..$max){
$sum += $vector[$position];
}
say 'Result: \t '.$sum;