السلام عليكم لو سمحتم ابغى احد يساعدني بحل هذي البرامج
Write a program that is implementing both stack and queue, as in the followings description.
1. Continuously get input from user until user wanted to stop.
2. For every input given by user, check if the input is an even or odd number. If the input is even, insert into a stack. But if the input is odd, insert into a queue.
3. Display the content of both stack and queue after completing all operations
Create a program that will read from user integer input. Check if the input number is palindrome. If the reversed number is same as the original number then print “the number is a palindrome”. You have to use stack and queue to complete this problem.
Example: If number is 12321 – this is palindrome. If number is 1234 – this is not palindrome
1. Get an input number from user
2. In a loop:
i. Read one digit at a time from the input number
a. use number modulo 10 to identify the right-most digit
b. use number divide 10 to continue identify next digit
ii. Insert each digit into the stack and the queue
3. In a loop:
i. Remove one digit at a time form stack and queue
ii. Compare both digits