local password = ""
math.randomseed(os.time())
local sum = {"a", "b", "c", "d", "s", "w", "#", "S", "P", "R", "E", "q", "m"} --Тут символы которые будут встречаться в пароле
local countSum = 8 --длина пароля
for i = 1, countSum do
password = password..sum[math.random(1, #sum)]
end
print("Пароль: "..password)
Алгоритм таков:
Подбирается случайный символ из массива и складывается с другими символами, которые были уже сгенерированы.
//PascalABC.NET
//Версия 3.3, сборка 1634
begin
write('массив: ');
var a:=ArrRandom(15,-100,100).Println;
write('кол-во элементов <10: ',a.Where(x->x<10).Count);
end.
using System;
using System.Linq;
namespace Prog
{
public class Program
{
public static void Main(string[] args)
{
String str = "15 0 87 2 34";
String[] nums = str.Split(' ');
var evenNumbers = nums.Where(i => Convert.ToInt32(i) % 2 == 0);
foreach (String i in evenNumbers)
Console.WriteLine(i);
}
}
}
Подробнее - на Znanija.com - znanija.com/task/30617450#readmore
<span>a = int(input("a="))
b = int(input("b="))
c = int(input("c="))
d = int(input("d="))
print("2*(",a,"^2-",b,"^2) = ",2*(a^2-b^2))
print('(',a,'+',b,')*(',c,'+',d,')=',(a+b)*(c+d))
print('(2*',a,'+',b,')/',c,'-2*',d,'=',(2*a+b)/c-2*d)</span>