Dastur Program L24a; {Sonning bo’luvchilari. 2 -usul }
uses Crt;
var n, d : integer;
begin write('Butun sonni kiriting '); readln(n);
writeln(n, ‘sonining bo’luvchilari’);
d := 1;
while d*d < n do begin if n mod d=0 then write(d, ' ', n div d, ' ');
d := d + 1
end;
if d*d = n then write(d); writeln
end. Topshiriqlar: 1. 1*2*3*…*100qP i ko`paytmani hisoblash algoritmini tuzilsin.
Nazariy savollar. Takrorlanuvchi jarayonlar dеb nimaga aytiladi?
Ixtiyoriy bo’linishni hisoblash algorimini tuzing.
let p = 1;
for (let i = 1; i <= 100; i++) {
p *= i;
}
console.log(p)