Здесь Вы можете найти ответы на многие вопросы или задать свой вопрос!
program risovalka;
uses crt,graphabc;
var xc,yc,r1,r2,rc,ro,n,i,x,y: integer;
a: real;
begin repeatwrite('ykashi shislo otverstii ot 5 do 10 n=');
read(n);
until n in [5..10];
clrscr; hidecursor;
xc: =windowwidth div 2;
yc: =windowheight div 2;
r1: =40;
r2: =120;
rc: =100; ro: =30;
a: =2*pi/n;
circle(xc,yc,r2);
circle(xc,yc,r1);
for i: =1 to n do begin x: =xc+round(rc*cos(a*i));
y: =yc-round(rc*sin(a*i));
circle(x,y,ro);
end.
на паскале:
program myprogram; var n,i,fact: integer; sum: real; beginsum: =0; fact: =1; writeln('введите число n.'); readln(n); for i: =1 to n dobeginfact: =fact*i; sum: =sum+1/fact; end; writeln('сумма 1/1! +1/2! +1/3! ++1/n = ',sum); end.
Популярные вопросы