Написать программу вывода на экран всех простых чисел до 200
Answers & Comments
Srewaprogram PrimesToN; vari, k, n, count: word; beginreadln(n);for k := 1 to n do begincount := 0;for i := 1 to k do beginif k mod i = 0 then inc(count)end;if count = 2 then write(k, ' ')endend.
Answers & Comments
vari, k, n, count: word;
beginreadln(n);for k := 1 to n do begincount := 0;for i := 1 to k do beginif k mod i = 0 then inc(count)end;if count = 2 then write(k, ' ')endend.