C++ programming

Write a program to generate a randomly filled cube of 3 x 3 x 3size, print the cube, and tell whether it’s a magic cube. If it’smagic cube, print the magic number.
Since most likely the random generated cube is not magic cube,also prepare a hard-coded sample magic cube in your program fortest.
Write your code from scratch, but feel free to refer to thesample main.cpp.
Code your program with ‘modular design’. You have to usefunctions in your implementation. Adopt good programming practice,e.g. proper indentation in codes, meaningful variable names, clearcomments, etc.
A sample output of the program is given
PayPal Gateway not configured
PayPal Gateway not configured