Answered step by step
Verified Expert Solution
Link Copied!

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

Note: Expecting bool instead of int.

Input: 5, 3, 39, 11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions