This c++ code prints out the following prime numbers: 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97.
But I don\'t think tha
To find whether no. is prime or not C++:
#include #include using namespace std; int main(){ int n, counter=0; cout <<"Enter a number to check whether it is prime or not \n"; cin>>n; for(int i=2; i<=n-1;i++) { if (n%i==0) { cout<