Write a single line if statement to perform the following tasks:
i) To find the central digit of a five digit number e.g 76549 then central digit =5
ii) To check whether a number n is a magical number or not.(Magical number is such a number whose continuous sum of digits until it forms a single digit is 1 e.g 55=5+5=10=1+0=1 so 55 is a magical number[remember single if and no loops to be used]
iii)To check whether 3 integers x,y and z form a Pythagorean triplet.(A Pythagorean triplet is formed if the numbers satisfies Pythagoras theorem .)
iv) To check if a 3 digit number is a tri-automorphic number or not?(A number n is called a tri-automorphic number if 3*n*n ends in n e.g n=667 is a tri-automorphic number as 3X667X667 = 1334667 which ends in 667.
v) To check whether the 3 sides a, b, c of a triangle forms an obtuse angle triangle.[To form an obtuse angle triangle the square of any 2 sides should be greater than the sum of the squares of other two sides.]
Answers
Answered by
0
Answer:
Its useless to ask during tests
Explanation:
Just imagine if someone shares the screenshot to shruti maam?
Similar questions