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:aaabacadaebabb...eein c programming

Answer :

Answer:

This is the answer of this question.

OUTPUT: for (char i='a'; i<='e'; i++)

                for (char j='a'; j<='e'; j++)

                  {

                 System.out.print(i);

                 System.out.println(j);

                  }

Explanation:

      for (char outerChar='a'; outerChar<='e'; outer Char++){

     for (char innerChar='a'; innerChar<='e'; inner Char++){

      cout << outerChar << innerChar << "\n";

   }

}

This is the explanation of this program

Other Questions