1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mash [69]
4 years ago
12

Write a loop that displays all possible combinations of two letters where the letters are 'a', or 'b', or 'c', or 'd', or 'e'. T

he combinations should be displayed in ascending alphabetical order:
aa
ab
ac
ad
ae
ba
bb
...
ee

in c programming

Computers and Technology
1 answer:
nikitadnepr [17]4 years ago
3 0

Answer:

The program to this question can be given as:

Program:

#include <stdio.h> //include header file.

int main() //defining main method

{

char i,j; //defining variable

for  (i='a'; i<='e'; i++) //outer loop for column

{

for (j='a'; j<='e'; j++) //inner loop for row

{

printf("%c%c\n",i,j); //print value

}

}

return 0;

}

Output:

image.

Explanation:

  • In the above C language program, firstly a header file is included. Then the main method is defined in this, a method contains a char variable that is "i and j". This variable is used in for loop, that is used to print the pattern.
  • To print the following patter two for loop is used the outer loop is used for print columns and the inner loop prints row.
  • In C language to print character, we use "%c" inside a loop print function is used, that prints characters.

You might be interested in
What font family is Times New Roman an what font family is Arial?
Alexxandr [17]

Answer:

Some Font Examples

Generic Font Family                 Examples of Font Names

Serif                    Times New Roman Georgia Garamond

Sans-serif                          Arial Verdana Helvetica

Monospace                     Courier New Lucida Console Monaco

Cursive                        Brush Script MT Lucida Handwriting

Explanation:

hope it help

4 0
3 years ago
Read 2 more answers
Which layer of the iOS architecture is responsible for text and typography?
horsena [70]

Answer:

b

Explanation:

Its Media layer. its this one

5 0
3 years ago
Read 2 more answers
How could your program be useful in the real world?
anyanavicka [17]

Answer:

to answer the question I need to know what your program is and what it does

3 0
3 years ago
5. What skill is unique to reading online?
torisob [31]
Ignoring distractions like hyperlinks and advertisements
6 0
3 years ago
Which group on the Home Ribbon allows you to create bulleted and numbered lists in a PowerPoint presentation?
igomit [66]
You gotta do the paragraph group its that one
3 0
3 years ago
Read 2 more answers
Other questions:
  • Cite 3 funções para o uso de uma Rede de Computadores
    14·2 answers
  • Are there protections for people in terms of what data can be collected by different sites?
    10·1 answer
  • Deterime the minimum number of multiplication operations needed to compute the following. Show the order of the computations.
    10·1 answer
  • 2. Which company was first able to send a text? (Verizon, AT&amp;T, Cricket???)
    12·1 answer
  • Suppose the work required to stretch a spring from 1.1m beyond its natural length to a meters beyond its natural length is 5 J,
    14·1 answer
  • Write a function to output an array of ints on a single line. Funtion Should take an array and an array length and return a void
    9·1 answer
  • Why do bats sleep upside down
    7·1 answer
  • FREE BRAINLIEST!!!
    14·2 answers
  • An author is preparing to send their book to a publisher as an email attachment. The file on their computer is 1000 bytes. When
    8·1 answer
  • Online education provides _____.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!