Find if a molecule can be formed from 3 atoms using their valence numbers | C ++ implementation of the above approach ; Function to check if it is possible ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void printPossible ( int a , int b , int c ) { if ( ( a + b + c ) % 2 != 0 a + b < c ) cout << " NO " ; else cout << " YES " ; } int main ( ) { int a = 2 , b = 4 , c = 2 ; printPossible ( a , b , c ) ; return 0 ; }