Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A prime number is a number which is only divisible by 1 or itself (eg: 5, 11 etc). A 'magic 3' number is a number
A prime number is a number which is only divisible by 1 or itself (eg: 5, 11 etc). A 'magic 3' number is a number whose repeated sum of digits till the number becomes one digit is 3 (eg: 30, 1335 etc). Write a function which takes an integer array as input and prints P if number is prime, M3 if number is 'magic 3' and PM3 if number is both prime and magic.By using GO-LANG
Input: 5, 3, 39, 11
Output: P PM3 M3 P
NOTE- Do not use library functions, Optimize the code And need output as Automatically not given by user
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started