1)
var k1,k2,k3,k4:integer;
f,f1,f2,f3,f4:real;
begin
write('F = ');
readln(f);
writeln('k1, k2, k3, k4:');
readln(k1,k2,k3,k4);
f1:=f/(k1+k2+k3+k4)*k1;
f2:=f/(k1+k2+k3+k4)*k2;
f3:=f/(k1+k2+k3+k4)*k3;
f4:=f/(k1+k2+k3+k4)*k4;
writeln('f1 = ',f1:5:2);
writeln('f2 = ',f2:5:2);
writeln('f3 = ',f3:5:2);
writeln('f4 = ',f4:5:2);
end.
Пример:
F = 5
k1, k2, k3, k4:
11 14 13 12
f1 = 1.10
f2 = 1.40
f3 = 1.30
f4 = 1.20
2)
var a,a4,a6:real;
begin
write('a = ');
readln(a);
a4:=a*a; //a^2
a4:=a4*a4; //a^4
writeln(a,'^4 = ',a4);
a6:=a*a; //a^2
a6:=a6*a6*a6; //a^6
writeln(a,'^6 = ',a6);
end.
Пример:
a = 2
2^4 = 16
2^6 = 64