Codechef Problems: Bitcoin Market (P1209)

 Problem Statement: 


Solution: 

Given, 
    R : market risk level (from 1: Very safe to 10: Very Risky)

condition: chef buy bitcoin only when R <= 4 

condition 1 : R <= 4
output: YES 

condition 2 : Otherwise 
output: NO 

Code Solution: 

#include <bits/stdc++.h>

using namespace std;

int main() {
    int r;
    cin >> r;

    if (r <= 4) {
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
}

Comments