Question: Professor said there are wrong things in my code The picture I attatched is what I coded It is the assignment: #include #include #include using

Professor said there are wrong things in my code
The picture I attatched is what I coded
 
It is the assignment:
#include  #include  #include  using namespace std; Write a program called primes: 1. Write a boolean function: bool isPrime(integer n). Returns true if prime; false if not prime. 2. Write in main() 3. Declare a vector lst: vector primes_list; 4. Write an infinite loop: 5. Inside the loop, ask the use to enter a poisitive integer num 6. Read the positive integer num. 7. Call isPrime function for all the numbers from 1 to num, inclusively. 8. Store all the primes in primes_list as follows: primes_list.push_back(i); 9. Ask the user if they want to continue and read a new number. 10. Outside the loop, print all the prime numbers. Use any or all of these methods: for (int val : primes_list) cout  
 Professor said there are wrong things in my code The picture

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!