Basically choice 3 i need to get only the prime #s from the fibonacci numbers and also for choice 4 is to generate 5 random numbers that are prime numbers only and also to get the total count of how many times it had to generate to get 5 prime #s.
If you guys can help or give me hints it would be great.Thank you.
First I personnaly would suggest to use a function "bool isPrime(int n)" to avoid code redundancy, I think using a "switch(choice)" would also be preferrable to the many "if" statements and make the code more readable.
Your choice 3 doesn't work because the reinitialisation of the boolean prime is not done for every prime number you want to test; thus the use of a primality check function would clarify this.
Concerning you choice 5, I guess it would be easier to compute all prime numbers, store them in a vector, then pick 5 random indices in [0;sizeof(vector)]; Or at least store previous picked number in a Set to avoid testing them many times.