CBSE BOARD XII, asked by dk09291, 1 month ago

Question Find Key: You are provided with 3 numbers : input1, input2 and input3. Each of these are four digit numbers within the range >=1000 and <=9999. ie. 1000 <= input1 <= 9999 1000 <= input2 <= 9999 1000 <= input3 <= 9999 You are expected to find the Key using the below formula - Key = (Sum of Smallest digits of all the 3 numbers) - (Sum of Largest digits of all the 3 numbers) For e g. if input1 = 3521, input2=2452, input3=1352, then Key = (1+2+1) - (5+5+5) = -11 Assuming that the 3 numbers are passed to the given function, Complete the function to find and return the Key.

Answers

Answered by ankitat2903
5

Answer:

You are provided with 3 numbers : input1, input2 and input3.

Each of these are four digit numbers within the range >=1000 and <=9999.

i.e.

1000 <= input1 <= 9999

1000 <= input2 <= 9999

1000 <= input3 <= 9999

You are expected to find the Key using the below formula –

Key = (Hundreds digit of input1 x Tens digit of input2) – (Largest digit of input3)

For e..g. if input1 = 3521, input2=2452, input3=1352, then Key = (5 x 5) – 5 = 20

Assuming that the 3 numbers are passed to the given function, Complete the function to find and return the Key.

Similar questions