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

Recommended Answers

All 2 Replies

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

Then think about modifying it to detect a palindrome.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.