//PascalABC.NET 3.2 сборка 1318
Var
n,first,oth:integer;
begin
readln(n);
first:=n mod 10;
oth:=n div 10;
if first<>0 then writeln(first,oth) else writeln('X не трёхзначеное');
end.
Пример ввода:
234
Пример вывода:
423
1.
#include <stdio.h>
#include <math.h>
int main()
{
float x1, xn, h;
float a = 4, b = 7;
printf("Введите x1, xn, h:\n");
scanf("%f",&x1);
scanf("%f",&xn);
scanf("%f",&h);
for (float x=x1; x<=xn; x +=h)
printf("x = %.2f y = %.5f\n",x,b*x*sqrt(1+log(x)));
return 0;
}
2.
#include <stdio.h>
#include <math.h>
int main()
{
float x1, xn, h, x;
float a = 4, b = 7;
printf("Введите x1, xn, h:\n");
scanf("%f",&x1);
scanf("%f",&xn);
scanf("%f",&h);
x = x1;
while (x<=xn){
printf("x = %.2f y = %.5f\n",x,b*x*sqrt(1+log(x)));
x += h;
}
return 0;
}
3.
#include <stdio.h>
#include <math.h>
int main()
{
float x1, xn, h, x;
float a = 4, b = 7;
printf("Введите x1, xn, h:\n");
scanf("%f",&x1);
scanf("%f",&xn);
scanf("%f",&h);
x = x1;
do {
printf("x = %.2f y = %.5f\n",x,b*x*sqrt(1+log(x)));
x += h;
}
while (x<=xn);
return 0;
}
Пример:
<span>Введите x1, xn, h:
2
5
0.1
x = 2.00 y = 18.21694
x = 2.10 y = 19.40142
x = 2.20 y = 20.59491
...
x = 4.90 y = 55.19244
x = 5.00 y = 56.53810</span>
Var ar:array[1..10] of integer;
i,k1,k2,k3:integer;
begin;
randomize;
k2:=1;
writeln('Array:');
for i:=1 to 10 do
begin;
ar[i]:=random(10);
write(ar[i]:4);
if odd(i) then k2:=k2*ar[i] else k1:=k1+ar[i];
if ar[i]>3 then inc(k3);
end;
writeln;
writeln('1:',k1);
writeln('2:',k2);
writeln('3:',k3);
end.