C Program to check whether a number is magic number or not

OUTPUT: