Write a C++ program to execute the following the logic:
Create a class named with MagicNumber, having one data member like No and having different member function to perform the unique task. All the member functions are must be as argument based function.
GetNo(),PrintNo(int),FactNo(int),PatternNo(int),PrimeNo(int),SquareNo(int).
• GetNo function will get the any positive number from user.
• If no is >10 than call the SquareNo function and find the square of that no.
• If no >5 and <10 than call FactNo function and find the factorial of that no.
• If no<5 then call the PatternNo function and display any pattern based on that no.
• If given number is odd than call the PrimeNo function and check given no is prime or not.
Attachments:
Answers
Answered by
1
Answer:
C++ ???"?!?!!???!???????
Similar questions