0

Hello , im a very new to programming and i have a Question please.
i must write a program in Assembly the Question is :
"after giving a maximum of 30 positive numbers the program must output if the given number (Sequence) is a palindrome or not.( intering "0" or the thirty number - stop condition = output palindrome or not palindrome)."

please help with the Algorithm and the program code...

thanks

3
Contributors
2
Replies
4
Views
8 Years
Discussion Span
Last Post by afas87
0

Start with the basics.
Read some input, and print it right back out.

Then think about modifying it to detect a palindrome.

0

hi,
assume that u store the sequence in array A,, i think u can do that by declare another array,let it be A,,
and then reverse the sequence of numbers and store them in this array
and cmpr the two arrays
if the two arrays are identical, then the result of cmpr is 1,the sequence is palindrome.
hope to be usefull

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.