+ 2

Hello..i need a c++ code to find a prime number in 5x5 array and put the results in new array

3rd Dec 2017, 11:56 AM
Memo
Memo - avatar
5 Answers
+ 2
https://code.sololearn.com/ctTj4YuZJ026/#cpp There is only one problem. As per my program, 1 is a prime number(which is not). But otherwise it works fine. You can add a small condition like ignore 1 in the main function itself. As of now , by adding single line comments the program is understandable, so i recommend you to go through it. Thanks and sorry for the delay
3rd Dec 2017, 3:08 PM
RR2001
RR2001 - avatar
+ 2
I have the code but the problem is there is something wrong with it. Once i get it right for sure i will send it to you. Sorry from my side
3rd Dec 2017, 1:48 PM
RR2001
RR2001 - avatar
+ 1
Nice work... Thanks for help RR2001😄😄
3rd Dec 2017, 5:36 PM
Memo
Memo - avatar
0
Are you saying you want something that goes from {###P# ##### #P### ##### ###P#} to {PPP}?
3rd Dec 2017, 1:13 PM
Cyril Titus Makwembere
Cyril Titus Makwembere - avatar
0
RR2001 Thank you so much🙂
3rd Dec 2017, 1:55 PM
Memo
Memo - avatar