Computer Science, asked by sushmaeega2017, 2 months ago

um(int a, int b, int c);
The function accepts integers 'a', 'b' and 'c' as its argument. Integers 'a', 'b' and 'c' are to be sorted in descending order and then, fir
'y' and the last value is substituted in 'z'. A 3-digit number 'xyz' is created using the values of 'x', 'y' and 'z'. Implement the function to
(100 * x) + (10 * y) + z
xyz =
Assumption: 0 <= (a, b, c) <= 9
Note: Return o if all a, b, care 0.
Example:
Input:
a: 1
b: 8
C: 5
Output:
851
Explanation:
Descending order of a, b, c is {8, 5, 1}
Substituting x, y, z as follows:
71516-1015860
X = 8
y = 5
.
Z= 1
Integer xyz = (100 *'x) + (10 * y) + z = (100 * 8) + (10 * 5) + 1 = 851. Thus, output is 851.
Sample Input
a: 3
bilo
C: 7
Sample Output
738
Instructions:
.
This is a template based question, DO NOT write the "main" function.
Your​

Answers

Answered by Anonymous
1

Answer:

jzjs sjsj siabs skns sjw wjba ska wnjw qkqb sosbs ,k z zj snsjs sjsb wjs s sj

Similar questions