# Napishite the program which removes all prime numbers in the range from 2 to N (N is in advance unknown). Entrance the dannyevkhodny line contains integer N. Weekend of a dannyeprogramm has to remove all prime numbers in the range from 2 to N in one line, having divided them gaps. Primeryvkhodnye dannye20vykhodnye dannye2 3 5 7 11 13 17 19

Alisa

165

Var A, N, d: integer; Begin Write (N =); ReadLn(N); For N: = 2 to N do Begin d: = 0; A: = 2; Repeat if N mod A = 0 then d: = d+1; A: = A+1 Until A> Sqrt(N) +1; if d = 0 then Write (N) End End.

207

Answer add
hariton

### Other questions in the section - informatics

Brarius

Napissat the program which defines the maximum number from the sequence of polozhiktelny numbers

2020-10-26 10:00:32

Vavila

Napishite, please, it passes the program according to which in pascal animation of the

2020-10-26 10:00:32

Egor

four-digit is given I chisloit to determine the sum of the first and last

2020-10-26 10:00:32

Molafit

Pascal subject Stroki1) From the keyboard is entered a line. To count How to

2020-10-26 10:00:32

Marianovich

Pascal a subject of Line 1) From the keyboard is entered the line consisting

2020-10-26 10:00:32