Codechef Problems: Dice Play (P1HOME)

 

Problem Statement:

https://www.codechef.com/problems/P1HOME

Solution:

Given, A : Number shown on first dice

            B : Number shown on second dice

To find: check whether two faces have same value

Condition 1 : A equals to B

Output : YES

Condition 2 : otherwise

Output : NO

 

Code Solution:

#include <bits/stdc++.h>

using namespace std;

int main() {

    int a, b;

    cin >> a >> b;

    if (a == b) {

        cout << "YES" << endl;

    } else {

        cout << "NO" << endl;

    }

    return 0;

}

Comments