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.
i.e.
1000<=input1 <-9999 1000 <=input2 <= 9999
1000<input3 <= 9999
You are expected to find the Key using the below formula -
Key = (Sum of Largest digits of all the 3 numbers) + (Sum of Smallest digits of all the 3 numbers) For e..g. if input1 = 3521, input2=2452, input3=1352, then
Key = (5+5+5) + (1+2+1) = 19
Assuming that the 3 numbers are passed to the given function, Complete the function to find and return the Key
Answers
Answered by
1
Answer:
Encapsulation is one of the fundamentals of OOP (object-oriented programming). It refers to the bundling of data with the methods that operate on that data. Encapsulation is used to hide the values or state of a structured data object inside a class, preventing unauthorized parties' direct access to them.
Similar questions
Math,
24 days ago
Physics,
1 month ago
Business Studies,
1 month ago
Biology,
9 months ago
Math,
9 months ago