Pronic Number
Prenic number is a number which is the product of two consecutive integers, that is, a number n is a product of x and (x+1) -
Ekea siring in which random numbers are present and we have to find the product and the numbers(one is lesser and cne is greater which are alrszty
prezent in the siringalso the numbers x and xt1 are single digit numbers. Let's see the sample
Ex Given a siring contains 1203456. The mulãiplication of 3 and 4 one is laser and one is greater) product become 12 and it's present in the string. Like
4 and 5 (oneis laser and one is greater) the produci is 20andits present in thesising and so on.
In such a way, We have to find all the numbersand in the Cuiput, we have to display the pronic numbers on a single line Displayonly distince numbers
and make sure they are in scried order.
Ihrehaven't found any product then print-1
7
Example Input
1203456789
z
N 11
Output
8 26 12 2e 56
5
I want java program
Answers
Answered by
0
answers
The numbers that can be arranged to form a rectangle are called Rectangular Numbers (also known as Pronic numbers). The first few Pronic numbers are:
0, 2, 6, 12, 20, 30, 42, 56, 72, 90, 110, 132, 156, 182, 210, 240, 272, 306, 342, 380, 420, 462 . . . . . .
Pronic number is a number which is the product of two consecutive integers, that is, a number n is a product of x and (x+1). The task is to check and print Pronic Numbers in a range.
hope it will help you
Similar questions