Program to check if N is a Myriagon Number | C ++ program for the above approach ; Function to check if N is a Myriagon Number ; Condition to check if the number is a Myriagon number ; Driver Code ; Given Number ; Function call
#include <bits/stdc++.h> NEW_LINE using namespace std ; bool isMyriagon ( int N ) { float n = ( 9996 + sqrt ( 79984 * N + 99920016 ) ) / 19996 ; return ( n - ( int ) n ) == 0 ; } int main ( ) { int N = 10000 ; if ( isMyriagon ( N ) ) { cout << " Yes " ; } else { cout << " No " ; } return 0 ; }