Prime

PHOTO EMBED

Tue Oct 12 2021 02:12:57 GMT+0000 (Coordinated Universal Time)

Saved by @code_ea

#include <iostream>
#include <limits.h>
using namespace std;

 bool isPrime(int n)
{
	if(n==1)
		return false;

	for(int i=2; i*i<=n; i++)
	{
		if(n % i == 0)
			return false; 
	}

	return true;
}

int main() {
    
    	int n = 65;
    	
    	printf("%s", isPrime(n) ? "true" : "false");
    	
    	return 0;
}
content_copyCOPY

https://ide.geeksforgeeks.org/OOF8iVVsbv