Prime Number is a whole number which is greater than 1 and has only two factors – 1 and itself.
For example: 2, 3, 5, 7, . . . and so on.
Similarly, an Armstrong Number is a number that is equal to the sum of cubes of its digits.
For example: 153, 370, 371, . . . and so on.
Output:
Enter a Positive integer :371
Enter P to check prime and A to check Armstrong number:a
371 is an Armstrong number
need an explanation for this answer? contact us directly to get an explanation for this answer