Write a program that reads a sequence of words and checks that all those in even positions form an ascending sequence.
Each word in the input sequence consists only of lower case letters and has length at least 1. Words are separated by blank spaces or line ends, or both; at least one such separator, but maybe more than one. Their positions in the sequence are considered as starting with position zero.
The words in odd positions can be arbitrary; if the words in even positions form an ascending sequence, according to the standard inequality comparison on strings, your program must write the message: "Even-Position Words Ascending." Otherwise, your program must write the message: "Even-Position Words Not Ascending."
Author: José Luis Balcázar
Generation: 2026-01-25T16:40:15.960Z
© Jutge.org, 2006–2026.
https://jutge.org