+ 1
Write a code which take input of number and give output a number whose digit is in reverse order but of only five from last.
If input number is less than five number then give '0' in output in place of that to complete 5 digit. For ex- If input is 12345 then output will be 54321. if input will be 1234567 then output will be 76543. If input will be 123 then output will be 32100.
1 Respuesta
+ 7
Get input as string, reverse print it using a loop which only iterates 5 times. If string length is less than 5, print "0" in place of str[i]. Voila.