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]
3 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]3 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
Most network cards contain a port that accepts a(n) ____, which looks similar to a telephone connector but is larger.
Vadim26 [7]
YOUR ANSWER IS -------- It accepts a RJ-45 connector
hope i helped you :).
take care
8 0
3 years ago
10. Calculate the checksum for blocks of data with the following byte sum. (a) 1220 (b) 950​
OLga [1]

Answer:kalo gk salah yang

a

Explanation:

5 0
3 years ago
Write a Java program in jGRASP that creates a 2D integer array of 5 rows and 20 columns, fills it with increasing integer values
Alex73 [517]

Answer:

As per the question we need to make 5 rowa and 2o columns, in this we have total element 100 so range should be 0 to 99, but we are suggested to keep range 0 to 59, so i have kept the elementns in the range, but if it was a typo in the question for range you do not need to reset the k with zero.

Explanation:

//create a new class  TestArray

public class TestArray {

//define main method

public static void main(String[] args) {

 //declare a 2D array of given size i.e. 5 rows and 20 columns

 int arr[][] = new int[5][20];

 //declare an integer variable k and initialize it with zero, this will used to initialize the array from 0 to 99

 int k = 0;

 //for loop for rows

 for (int i = 0; i < 5; i++) {

  //for loop for columns

  for (int j = 0; j < 20; j++) {

   //initialize arr with the current value of k

   arr[i][j] = k;

   //once k is 59 set it zero again as we are not going beyond 59

   if(k == 59)

    k = 0;

   //increment value of k with 1

   k++;

  }

 }

 //print the element from the array one by one

 //for loop for rows

 for (int i = 0; i < 5; i++) {

  //for loop for columns

  for (int j = 0; j < 20; j++) {

   //print the current element of array and an space with it

   System.out.print(arr[i][j]+" ");

  }

  // move the cursor to new line

  System.out.println();

 }

}

}

7 0
4 years ago
What does % find on edhesive??
statuscvo [17]

Answer:

Explanation: What is that word you typed?

3 0
3 years ago
How can you prevent the flash from going off no matter how much light there is iready
Goshia [24]
There is a setting.
8 0
3 years ago
Other questions:
  • Given a floating point variable fraction, write a statement that displays the value of fraction on the screen. Do not display an
    13·1 answer
  • URGENT!! Which graphic design tools help you draw circles and rectangles?
    12·2 answers
  • Denny often uses his word-processing program. Which of the following would Denny do to more easily access this program and incre
    14·2 answers
  • What are two ways to access the options for scaling and page orientation? click the home tab, then click alignment, or click the
    10·1 answer
  • ShellShock had the potential for an unauthorized user to gain access to a server. It affected many internet-facing services, whi
    11·1 answer
  • eplace the underlines with the words in parentheses that follow: The ____ solves the ____ of a ____ by expressing an ____ in a _
    5·1 answer
  • All of the following are strategies to help you prepare for standardized test except <br>​
    5·1 answer
  • Create a project named ClassicBookSelector that contains a Form with a ListBox that lists at least five classic books that you t
    10·1 answer
  • To move to the beginning of the line with the keyboard, press the _______ key(s).
    6·1 answer
  • How does abstraction make programming languages easier to use
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!