wap to take a 5 digit no as input then store all its digit in array and display those digits in descending order
Answers
Answered by
0
Explanation:
num = 4562
rev_num = 0
rev_num = rev_num *10 + num%10 = 2
num = num/10 = 456
rev_num = rev_num *10 + num%10 = 20 + 6 = 26
num = num/10 = 45
rev_num = rev_num *10 + num%10 = 260 + 5 = 265
num = num/10 = 4
rev_num = rev_num *10 + num%10 = 265 + 4 = 2654
num = num/10 = 0
Similar questions
English,
3 months ago
Math,
3 months ago
Biology,
6 months ago
Social Sciences,
6 months ago
Environmental Sciences,
11 months ago