| 5 | #include <iostream> |
| 6 | using namespace std; |
| 7 | int main4() { |
| 8 | int num, j = 0; |
| 9 | cout << "Enter the number: "; |
| 10 | cin >> num; |
| 11 | for (int i = 1; i <= num; i++) |
| 12 | { |
| 13 | if ((num % i) == 0) |
| 14 | { |
| 15 | j++; |
| 16 | } |
| 17 | } |
| 18 | if (j == 2) |
| 19 | cout << num << " is a prime number." << endl; |
| 20 | else |
| 21 | cout << num << " is not a prime number." << endl; |
| 22 | system("pause"); |
| 23 | return 0; |
| 24 | } |
nothing calls this directly
no outgoing calls
no test coverage detected