From b99c7ea81ecfb543fad5dd3ef3b2d2f0650ff21e Mon Sep 17 00:00:00 2001 From: Lijin Daniel Joseph Date: Wed, 26 Oct 2022 09:42:06 +0530 Subject: [PATCH] Create Prime or not please accept --- Prime or not | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Prime or not diff --git a/Prime or not b/Prime or not new file mode 100644 index 0000000..20adb1c --- /dev/null +++ b/Prime or not @@ -0,0 +1,21 @@ +#include +using namespace std; +int main() +{ + int n, i, m=0, flag=0; + cout << "Enter the Number to check Prime: "; + cin >> n; + m=n/2; + for(i = 2; i <= m; i++) + { + if(n % i == 0) + { + cout<<"Number is not Prime."<