cristinaledford6927 cristinaledford6927
  • 07-07-2017
  • Computers and Technology
contestada

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

Respuesta :

tonb
tonb tonb
  • 10-07-2017
for (char first = 'a'; first <= 'e'; first++) {    
   for (char second = 'a'; second <= 'e'; second++) {
      printf("%c%c\n", first, second);    
   }
}
Answer Link

Otras preguntas

Equation of the line parallel to the equation y = -2x - 7 that passes through the point (3, 1).
Why does fossil fuel use in the United States make the U.S. vulnerable to the political wishes of foreign countries?
what describes how the common cold spreads in the human body
Can someone summarize the technique of gel electrophoresis in one or two sentences?
The Articles of Confederation placed most government power and responsibility with the?
Please answer with steps thank you :)
A length of 16.45 m in centimeters.Conv. Factor                                   Set-up
history of spherical mirrors in human civilization
There are 20 mice in a 5 m^2 field ecosystem. The population density of mice is _____.
Clint runs c miles each week. Brenda runs 2 miles more each week than Clint. Write an expression for the number of miles Brenda runs each week.