<em><u>Pascal:</u></em>
var a:array [1..10] of integer;
begin
for i:=1 to 10 do
begin
write ('A[',i,'] = ');
readln (a[i]);
end;
end.
<u><em>C++:</em></u>
#include <iostream>
using namespace std;
int main()
{
int a[10];
for (int i = 0; i<10; i++)
{
cout <<"A[" <<i <<"] = ";
cin >>a[i];
}
return 0;
}
Var b, m, a: real;
mm: integer;
begin
read(b, m, a, mm);
writeln(power(b, m));
writeln(power(a, 5.0));
writeln(max(0, (12 + 6 * (mm div 6 - 1)) * (mm div 6) div 2));
end.
Var
a, b, n: integer;
sr: real;
begin
sr := 0;
n := 0;
read(a, b);
if(a > b) then a := b;
while a > 0 do
begin
if((a mod 10) mod 2 = 0) then begin
sr := sr + a mod 10;
n := n + 1;
end;
a := a div 10;
end;
write(sr / n);
end.
#include <iostream>
int main()
{
int x, k = 0;
cin >> x;
for (int i = 1; i <= x; i++)
{
if (x % i == 0 )
{
k++;
}
}
cout << k;
return 0;
}
Попробуйте так
Если будут вопросы – обращайтесь :)