write a program in single dimensional array to store 10 numbers in a single dimensional array .Display only those which are palindrome
Answers
Answered by
0
a=[0,0,0,0,0,0,0,0,0,0]
s=0
for i in range (10):
...........a [i ]=int (input ("enter no."))
c[ ]=a[i]
for j in range a[ i ]:
..........d=a [ j ]%10
..........a [j]=a [j]//10
..........s=s*10+d
...........while s>0
.....................if s==c [ ]:
.............................print ("s")
i hope its help and i think it is correct ☆☆ :)
in place of dot there should be space :)
s=0
for i in range (10):
...........a [i ]=int (input ("enter no."))
c[ ]=a[i]
for j in range a[ i ]:
..........d=a [ j ]%10
..........a [j]=a [j]//10
..........s=s*10+d
...........while s>0
.....................if s==c [ ]:
.............................print ("s")
i hope its help and i think it is correct ☆☆ :)
in place of dot there should be space :)
Similar questions
Physics,
7 months ago
Math,
7 months ago
India Languages,
7 months ago
Social Sciences,
1 year ago
Geography,
1 year ago