WriteLn('Введите три числа'); ReadLn(A,B,C); if (A<=B)and(B<=C) then Write(A,' ',B,' ',C) else if (A<=C)and(C<=B) then Write(A,' ',C,' ',B) else if (B<=A)and(A<=C) then Write(B,' ',A,' ',C) else if (B<=C)and(C<=A) then Write(B,' ',C,' ',A) else if (C<=A)and(A<=B) then Write(C,' ',A,' ',B) else if (C<=B)and(B<=A) then Write(C,' ',B,' ',A) End.
Var a,b,c,D:real; Begin Write('a = ');ReadLn(a); Write('b = ');ReadLn(b); Write('c = ');ReadLn(c); D:=b*b-4*a*c; if D>=0 then Begin WriteLn('x = ',(-b-sqrt(D))/(2*a)); WriteLn('x = ',(-b+sqrt(D))/(2*a)); End else WriteLn('Действительных корней нет') End.
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <cstdio>
using namespace std;
void main()
{
setlocale(LC_ALL, "Russian");
int i;
double s = 0, k, size;
double mas[200];
cout << "Введите размерность массива:";
cin >> size;
srand(time(NULL));
for (i = 0; i < size; i++)
{
mas[i] = 0 + rand() % 100; cout << mas[i] << " ";
}
cout << endl;
for (i = 0; i < size; i++)
{
s = s + mas[i];
}
k = s / size;
cout << "Среднее арифметическое:" << k <<endl;
system("pause");
}