program xopow1; uses crt; var a, b, Sek: integer; begin writeln('Введите границы:'); repeat readln(a, b); until b >= a; clrscr; for a := a to b do begin Sek := a * 60; writeln(a, ' мин. = ', sek, ' сек.') end end.
2.
program xopow2; uses crt; Var z:integer; f,x,y:real; Begin clrscr; Writeln; X:=10000; Y:=(x/100)*10; for z:=1 to 7 do Begin X:=x+y; Writeln(Z,' -й день тренировок спортсмен пробежал ',X:3:2,' Км.'); End; Writeln('Нажмите Enter...'); Readln; end.
#include <iostream>#include <cmath>using namespace std;int main(){ int x; float A; cout<<"Введите х="; cin>>x; if (x >= M_PI){ A=0; cout<<"y=0"; } else if(M_PI>x && x>=0) { A=sin(x); cout<<"y=sin(x)"; } else if (0>x && x>=-2){ A=0; cout<<"y="; } else if (x<=-2) { A = pow((x+2),2); cout <<"y="; }
return 0;}
program xopow1;
uses crt;
var
a, b, Sek: integer;
begin
writeln('Введите границы:');
repeat
readln(a, b);
until b >= a;
clrscr;
for a := a to b do
begin
Sek := a * 60;
writeln(a, ' мин. = ', sek, ' сек.')
end
end.
2.
program xopow2;
uses crt;
Var
z:integer;
f,x,y:real;
Begin
clrscr;
Writeln;
X:=10000;
Y:=(x/100)*10;
for z:=1 to 7 do
Begin
X:=x+y;
Writeln(Z,' -й день тренировок спортсмен пробежал ',X:3:2,' Км.');
End;
Writeln('Нажмите Enter...');
Readln;
end.