Solved problems are a specially designed set of problems which are usually based on some concept learning code sheets and they do enrich your learning of concepts along. They also provide you confidence to solve real life problems. Solutions to these problems are visible on user's request with press of a button.
Write a program to input a number and check and print whether it is a Pronic
Write a program to input a number and check and print whether it is a Pronic number or not. (Pronic number is the number which is the product of two consecutive integers)
Examples: 12 = 3 x 4
20 = 4 x 5
42 = 6 x 7
Write a program to accept a number and check and display whether it is a spy
Write a program to accept a number and check and display whether it is a spy number or not. (A number is spy if the sum of its digits equals the product of its digits.)
Example: consider the number 1124, Sum of the digits = 1 + 1 + 2 + 4 = 8
Product of the digits = 1 x 1 x 2 x 4 = 8