Untitled
Anonymous
plain_text
10/14/2024 5:36 PM
456 B
15
Indexable
// Online C++ compiler to run C++ program online
#include <iostream>
using namespace std;
int main() {
int n, prime = 1;
cin >> n;
if (n <= 1) prime = 0;
for (int i = 2; i < n && prime == 1; i++)
if (n % i == 0) prime = 0;
if (prime == 1)
cout << "yes";
else
cout << "no";
return 0;
}
Editor is loading...
Leave a Comment