Program project1777; uses math, Classes ; var x,y,z:integer; begin writeln('vedite 1 chislo');readln(x); writeln('vedite 2 chislo');readln(y); writeln('vedite 3 chislo');readln(z); begin if ((x>y) and (x>z)) then writeln('samoe bolshoe chislo ',x) else if ((y>x) and (y>z)) then writeln('samoe bolshoe chislo ',y) else if ((z>x) and (z>y)) then writeln('samoe bolshoe chislo ',z); end; begin if ((x<y) and (x<z)) then writeln('samoe malenkoe chislo ',x) else if ((y<x) and (y<z)) then writeln('samoe malenkoe chislo ',y) else if ((z<x) and (z<y)) then writeln('samoe malenkoe chislo ',z); end; readln; end.
Pascal: const n = 10; var a:array [1..n] of integer; i,max,c:integer; begin clrscr; readln (a[1]); max:=a[1]; c:=1; for i:=2 to n do begin readln (a[i]); if a[i]>max then begin max:=a[i]; c:=1; end else if a[i]=max then inc(c); end; writeln ('Kol-vo: ',c); end.
C++: #include <iostream> using namespace std;
int main() { int a[10]; int c = 0,max; cin >>a[0]; max = a[0]; for (int i = 1; i<10; i++) { cin >>a[i]; if (a[i]>max) { max = a[i]; c = 1; } else if (a[i]==max) ++c; } cout <<"KOL_VO: " <<c <<endl; return 0; }
uses math, Classes ;
var x,y,z:integer;
begin
writeln('vedite 1 chislo');readln(x);
writeln('vedite 2 chislo');readln(y);
writeln('vedite 3 chislo');readln(z);
begin
if ((x>y) and (x>z)) then writeln('samoe bolshoe chislo ',x)
else
if ((y>x) and (y>z)) then writeln('samoe bolshoe chislo ',y)
else
if ((z>x) and (z>y)) then
writeln('samoe bolshoe chislo ',z);
end;
begin
if ((x<y) and (x<z)) then
writeln('samoe malenkoe chislo ',x)
else
if ((y<x) and (y<z)) then
writeln('samoe malenkoe chislo ',y)
else
if ((z<x) and (z<y)) then
writeln('samoe malenkoe chislo ',z);
end;
readln;
end.