We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 109bdac commit cb35aa6Copy full SHA for cb35aa6
dimik-even-odd-1/en.md
@@ -0,0 +1,29 @@
1
+# Dimik - Even Odd 1
2
+
3
+In this problem, you will be given `T` testcases.Each line of the testcase consist of an integer `n`.We have to determine whether `n` is even or odd.
4
5
+### Solution
6
+* If n is divisible by 2
7
+ * its a even number so print 'even'
8
+* if its not divisible by 2
9
+ * its a odd number so print 'odd'
10
11
+### C++
12
+```cpp
13
+#include <bits/stdc++.h>
14
+using namespace std;
15
+int main()
16
+{
17
+ int t;
18
+ cin >> t;
19
+ for (int k = 1; k <= t; k++)
20
+ {
21
+ int n;
22
+ cin >> n;
23
+ if (n % 2)
24
+ cout << "odd" << endl;
25
+ else
26
+ cout << "even" << endl;
27
+ }
28
+}
29
+```
0 commit comments