ответ:
static void main(string[] args)
{
int n; double proizvedenie = 1;
console.write("укажите размерность массива: ");
n = convert.toint32(console.;
int[] mas = new int[n];
random rnd = new random();
for (int i = 0; i < n; i++)
{
mas[i] = rnd.next(1, 10);
}
console.writeline("массив: ");
for (int i = 0; i < n; i++)
{
console.write(string.format("{0,3}", ;
}
console.writeline();
if (n > = 200)
{
for (int i = 0; i < 200; i++)
{
proizvedenie = proizvedenie * math.pow(mas[i], 2);
}
console.writeline("произведение квадратов первых 200 чисел = " + proizvedenie);
}
else
{
console.writeline("размерность массива < 200.");
}
console.writeline();
console.readkey();
}
объяснение:
как я понял из вопроса - создаётся случайный массив из 200+ чисел, и находится произведение квадратов первых 200 чисел. число получается достаточно огромное.
Для нелюбящих указывать язык в задании предлагается решение на C# 7.3
using System;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
{
int[] data = ReadIntSeq(8, "Enter values").ToArray();
Console.Write(string.Format("Minimal number that ends by 9 is {0}", data.MinBy(x => x % 10 == 9)));
}
public static IEnumerable<int> ReadIntSeq(int n, string promt = null)
{
if (promt != null)
Console.WriteLine(promt);
for (int i = 0; i < n; i++)
{
yield return int.Parse(Console.ReadLine());
}
}
}
public static class Extensions
{
public static T MinBy<T>(this IEnumerable<T> source, Func<T, bool> predicate) where T: IComparable
{
return source.Where(predicate).Min();
}
}
var s,i,x : integer;
begin
Read(x);
For i:=1 to 5 do begin
s:=s + (x mod 10);
x:=x div 10;
end;
Write (s);
end.
Язык - ПаскальABC
Если хочешь можешь еще сделать проверку на пятизначное число.