From a8a2b23ff68b8387b95fa61e657ecd535da25428 Mon Sep 17 00:00:00 2001 From: Prabsimar-singh <115685692+Prabsimar-singh@users.noreply.github.com> Date: Wed, 11 Oct 2023 18:57:56 +0530 Subject: [PATCH 1/2] SolutionByPrabsimar.cpp --- .../SolutionByPrabsimar.cpp | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Basic/Check if A Number is Prime or Not/SolutionByPrabsimar.cpp diff --git a/Basic/Check if A Number is Prime or Not/SolutionByPrabsimar.cpp b/Basic/Check if A Number is Prime or Not/SolutionByPrabsimar.cpp new file mode 100644 index 000000000..8db9e5358 --- /dev/null +++ b/Basic/Check if A Number is Prime or Not/SolutionByPrabsimar.cpp @@ -0,0 +1,25 @@ +#PRIME OR NOT + +#include +#include +using namespace std; +int main(int argc, char const* argv[]) +{ + int n; + cout << "Enter a number: "<> n; + if (n <= 0) { + cout << "Kindly Enter Natural Numbers"< Date: Wed, 11 Oct 2023 19:14:10 +0530 Subject: [PATCH 2/2] Update SolutionByPrabsimar.cpp --- Basic/Check if A Number is Prime or Not/SolutionByPrabsimar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Basic/Check if A Number is Prime or Not/SolutionByPrabsimar.cpp b/Basic/Check if A Number is Prime or Not/SolutionByPrabsimar.cpp index 8db9e5358..cd19a7a95 100644 --- a/Basic/Check if A Number is Prime or Not/SolutionByPrabsimar.cpp +++ b/Basic/Check if A Number is Prime or Not/SolutionByPrabsimar.cpp @@ -1,4 +1,4 @@ -#PRIME OR NOT +//PRIME OR NOT #include #include