Hackerrank | 30 days of code | Day 3-Solution in c++| Conditional-Statements-hackerrank-Solution-in-c++


Hackerrank | 30 days of code | Day 3-Solution in c++| Intro-to-Conditional-Statements-hackerrank-Solution-in-c++

Hackerrank Solution 30-days-of-code
https://www.hackerrank.com/challenges/30-conditional-statements/problem
Day 3: Intro to Conditional statements.
#include <iostream> using namespace std; int main() { int N; cin >> N; if (N % 2 != 0) cout << "Weird"; else { if (N <= 5) cout << "Not Weird"; else if (N <= 20) cout << "Weird"; else cout << "Not Weird"; } }

Post a Comment

0 Comments