question archive Write-a program that will ask for a sentence
Subject:Computer SciencePrice: Bought3
Write-a program that will ask for a sentence. Determine the word(s) whose length is a prime. The word(s) will then be reversed and will also serve as the data for your stack ADT. Your program will terminate if there are no more word(s) to be pushed or popped.
Illustration:
Input: the quick brown fox jumps over the fence
Word(s): eht kciuq nworb xof spmuj eht ecnef //this will be the data for your stack
Size of the stack is 7
//Perform the required stack operations: push(), pop(), display(), top() and bottom()