Computer Science, asked by nabadisha579, 8 months ago

how to check spy number in an array

Answers

Answered by devrajsharma299
0

Answer:

Input : 1412

Explanation :  

sum = (1 + 4 + 1 + 2) = 8

product = (1 * 4 * 1 * 2) = 8

since, sum == product == 8

Output : Spy Number

Input : 132

Explanation :  

sum = (1 + 3 + 2) = 6

product = (1 * 3 * 2) = 6

since, sum == product == 6

Output : Spy Number

Explanation:

Similar questions