Max:=1; min:=1;
for k:=2 to n do begin
if a[k]>a[max] then max:=k;
if a[k] < a[min] then min:=k
end;
writeln ('max=', a[max]);
writeln ('min=', a[min]);
if max < min then writeln ('max раньше')
else writeln ('min раньше')
6) а)408:17=24(10)=11000(2)
б) 2410(8)=10100001000(2)=1288(10); 27(8)=10111(2)=23(10); 1288:23=56(10)=111000(2)=70(8)
в) D4A(16)=110101001010(2)=3402(10); 1B(16)=11011(2)=27(10); 3402:27=126(10)=1111110(2)=7E(16)
//Pascal ABC.NET 3.1 сборка 1256
Var
ars:array[1..12] of string:=('января','февраля','марта','апреля','мая','июня','июля','августа','сентября','октября','ноября','декабря');
s:string;
begin
read(s);
if s[1]='0' then delete(s,1,1);
write(copy(s,1,pos('.',s)-1),' ');
delete(s,1,pos('.',s));
write(ars[strtoint(copy(s,1,pos('.',s)-1))],' ');
delete(s,1,pos('.',s));
write(s,' года');
end.
Пример ввода:
15.10.2012
Пример вывода:
<span>15 октября 2012 года</span>
#include <iostream>
#include <cstdlib>
#include <ctime>
using namespace std;
int main()
{
const int n = 4;
int a;
int mas[n][n];
srand(time(NULL));
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
a = rand() % 11 - 5 ;
mas[i][j] = a;
cout.width(3);
cout <<mas[i][j] <<" ";
}
cout <<endl;
}
cout <<endl;
for (int i = 0; i < n; i++)
{
for (int j = 0; j < n; j++)
{
if (mas[i][j]<0){
mas[i][j]=mas[i][j]*mas[i][0];
}
cout.width(3);
cout <<mas[i][j] <<" ";
}
cout <<endl;
}
return 0;
}
Ответ : Страны на континенте америка