Program pr;
uses crt;
Var a, b, c,x1,x2,x3:integer;
Begin
Writeln('Введите a, b, c');
readln(a, b, c);
if (a<=b) and (b<=c) then
Begin
a:=a*a*a;
b:=b*b*b;
c:=c*c*c;
Writeln(a);
Writeln(b);
Writeln(c);
end;
if (a>b) and (b>c) then
Begin
a:=a*(-1);
b:=b*(-1);
c:=c*(-1);
Writeln(a);
Writeln(b);
Writeln(c);
end
else
if (a<b) and (a<c) then Begin b:=a; c:=a; Writeln(a); Writeln(b); Writeln(c); end;
if (b<a) and (b<c) then Begin a:=b; c:=b; Writeln(a); Writeln(b); Writeln(c); end;
if (c<a) and (c<b) then Begin a:=c; b:=c; Writeln(a); Writeln(b); Writeln(c); end;
readln;
end.
#include <iostream>
using std::cout;
using std::endl;
using std::left;
#include <cstdlib>
using std::rand;
using std::srand;
#include <ctime>
using std::time;
#include <iomanip>
using std::setw;
int main()
{
int a[6][4];
int counter = 0;
srand(time(0));
for(int i = 0; i < 6; i++)
{
for(int j = 0; j < 4; j++)
{
a[i][j] = rand() % 20 + 1;
if(a[i][j] % 3 == 0)
{
counter++;
}
cout << setw(2) << left << a[i][j] << ' ';
}
cout << endl;
}
cout << '\n' << counter << " elements" << endl;
return 0;
}
uses crt;
var x, c: integer;
y: real;
begin
clrscr;
write (' enter x and c: ');
readln (x, c);
y:=((x+3)*(c+2))/(x+c);
writeln ('y=', y:0:4);
readkey;
end.