Codechef Problems: Christmas Greetings (CHRISTGREET)
Problem Statement:
https://www.codechef.com/problems/CHRISTGREET
Solution:
Given, 25th : Christmas day
X : Today’s
date
To find: check whether today is Christmas
Condition 1 : X == 25
Output: CHRISTMAS
Condition 2 : Otherwise
Output: ORDINARY
Code Solution:
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
if (x == 25) {
cout <<
"CHRISTMAS" << endl;
} else {
cout <<
"ORDINARY" << endl;
}
return 0;
}
Comments
Post a Comment