Write a program that reads
consonants and
vowels, and prints all the words that can be made up by using each
letter exactly once. The words must begin with a consonant, and
alternate consonants and vowels. In this exercise, we will assume that
‘y’ is a vowel.
Input consists of a natural number between 1 and 6, followed by different consonants and different vowels. Both consonants and vowels are given in alphabetical order.
Print the words that can be made up with the given letters, starting with a consonant and always alternating consonants and vowels. Print the words in alphabetical order, one per line.
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T11:30:27.446Z
© Jutge.org, 2006–2026.
https://jutge.org