Ask Question

Write a loop that displays all possible combinations of two letters where the letters are 'a', or 'b', or 'c', or 'd', or 'e'. the combinations should be displayed in ascending alphabetical order: aa ab ac ad ae ba bb ... ee

+5
Answers (1)
  1. 13 June, 08:46
    0
    for (char first = 'a'; first < = 'e'; first++) {

    for (char second = 'a'; second < = 'e'; second++) {

    printf ("%c%c/n", first, second);

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a loop that displays all possible combinations of two letters where the letters are 'a', or 'b', or 'c', or 'd', or 'e'. the ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers