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

A crystallographer measures the horizontal spacing between molecules in a crystal. The spacing is 11.62 nm . What is the total width of a crystal in millimeter
What does the Law of Conservation of Energy tell us?
General Continuous Random Variable problem. Given a is uniformly distributed over [-15,11], what is the probability that the roots of the equation are both real
what would the graph of y = x2 + 1 look like?
A Cashier has fifteen $5 bills . How Much does he have in $5 bills Someone thinks its 15 but i think its 75 .
How is literary nonfiction unique from other types of nonfiction? It includes more information in a shorter amount of space. It uses elements and devices more c
A construction crew is lengthening a road. The road started with a length of 58 miles, and the crew is adding 2 miles to the road each day. Let L represe
which points of concurrency can lie outside the triangle?
I e numbers add to?have got the numbers 18 20 23 24 27 if the 3 highest 3 consecutive numbers add to 30 what are the 3 lowest consecutive numbers add to
Decrease 340 minutes by 10%