Program faktorial;
uses crt;
var n,i,k : longint;
begin
clrscr;
writeln('Vvedite chislo');readln(n);
k:=1;
for i:=1 to n do
k:=k*i;
write('factorial chisla ',n,' raven ', k);
readkey;
<span>end.</span>
Program p;
var
a,b,c,s: integer;
begin
writeln('введите длину:');
readln(a);
writeln('введите диагональ:');
readln(c);
b := sqrt((sqr(c) - sqr(a)));
s := a * b;
writeln('площадь прямоугольника: ', s);
end.
Program bit;
var m,a1,a2,a3:
integer;
begin
writeln('введите три числа');
readln(a1,a2,a3);
if (a1<a2) and (a1<a3) then m:=a1;
if (a2<a1) and (a2<a3) then m:=a2;
if (a3<a1) and (a3<a2) then m:=a3;
if (a1=a2) and (a1=a3) then
writeln('они равны')
else writeln('меньшее из трёх ',m);
<span>end.</span>
Ответ 3) A[5,1]
1 2 3 4 5
6 7 8 9
10 11 12
13 14
<span>15</span>
#include "stdafx.h"
#include <iostream>
#include <ctime>
using namespace std;
int main()
{
srand(time(0));
int n;
cout << "N = ";
cin >> n;
double A[100];
for (int i = 0; i < n; i++)
{
cin >> A[i];
}
for (int i = 0; i < n; i++)
{
cout << A[i] << ' ';
}
cout << endl;
double max = -999;
for (int i = 0; i < n; i++)
{
if (max <= A[i])
max = A[i];
}
cout << max << endl;
system("pause");
return 0;
}