Posts by Luiz Henrique • 31 points
2 posts
-
-3
votes2
answers213
viewsQ: Generate a list of prime numbers up to 1000. These numbers should form a list, Lprimos. then check in Lprimos whether it is prime or not
I created an algorithm that prints the list, but I’m having difficulty doing the repetition that does the list search, I’m using if X in List, but I’m not getting it, someone could help me? The…
-
0
votes3
answers575
viewsQ: Construct a program to read positive integer n and print all primes in the range [2, n]
I need to create an algorithm that reads a number and tells you if it’s prime, and then print in a list all primes smaller than or equal to the read number. I made an algorithm that says if you’re…