From b208f4dd498e8090432439fddf8ea907cd88cee0 Mon Sep 17 00:00:00 2001 From: Gargi Kale <86710899+Gargi14@users.noreply.github.com> Date: Mon, 31 Oct 2022 16:21:56 +0530 Subject: [PATCH] Added Code for Even and odd number in cpp --- Even_Odd.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Even_Odd.cpp diff --git a/Even_Odd.cpp b/Even_Odd.cpp new file mode 100644 index 00000000..a186d07f --- /dev/null +++ b/Even_Odd.cpp @@ -0,0 +1,20 @@ +#include +using namespace std; + +int main() +{ + int no; + cout << "Enter any number: "; + cin >> no; + + if (no % 2 == 0) + { + cout << "The given number is EVEN" << endl; + } + else + { + cout << "The given number is ODD" << endl; + } + + return 0; +}