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
Fittoniya [83]
4 years ago
15

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:
Computers and Technology
1 answer:
Mars2501 [29]4 years ago
6 0

Answer:

In what programming language?

Explanation:

You might be interested in
Write a recursive method to return the number of uppercase letters in a String. You need to define the following two methods. Th
satela [25.4K]

Answer:

<u>Recursive function with two parameters that return the number of uppercase letters in a String</u>

public static int count(String str,int h)//Defining function

{

      if(str.charAt(0)>='A' && str.charAt(0)<='Z')//Checking the characters from A to Z

{

          h++; //incrementing the counter

          if(str.length()>=2){

              return count(str.substring(1),h);//recalling function

          }

      }

      if(str.length()>=2){

              return count(str.substring(1),h); //recalling function

      }

      return h;

  }

This is the recursive function with the name count of return type integer,having parameters str of string type and h of integer type.In this we are checking the characters at a particular position from A to Z.

<u>Recursive function with one parameter that return the number of uppercase letters in a String</u>

public static int count(String str)//Defining function

{

      if(str.charAt(0)>='A' && str.charAt(0)<='Z')//Checking the characters from A to Z

{

          count++; //incrementing the counter

          if(str.length()>=2){

              return count(str.substring(1));//recalling function

          }

      }

      if(str.length()>=2){

              return count(str.substring(1)); //recalling function

      }

      return count;

  }

This is the recursive function with the name count of return type integer,having parameters str of string type .In this we are checking the characters at a particular position from A to Z.

<u>Java program that return the number of uppercase letters in a String</u>

import java.util.*;

public class Myjava{

static int count =0;//Defining globally  

 

public static int count(String str,int h)//Defining function

{

      if(str.charAt(0)>='A' && str.charAt(0)<='Z')//Checking the characters from A to Z

{

          h++;

//incrementing the counter

          if(str.length()>=2){

              return count(str.substring(1),h);//recalling function

          }

      }

      if(str.length()>=2){

              return count(str.substring(1),h);

//recalling function

      }

      return h;

 

  }

  public static void main(String[] args)//driver function

  {

      System.out.println("Enter a string");//taking input

      Scanner scan = new Scanner(System.in);

      String s = scan.nextLine();

      int h =0;

      System.out.println("Counting the Uppercase letters: "+count(s,h));

  }

}

<u>Output</u>

Enter a string  WolFIE

Counting the Uppercase letters: 4

4 0
3 years ago
What information will you find in the 16-bit field in an IP datagram?
faust18 [17]

Answer: This 16-bit field defines the entire packet size in bytes, including header and data. The minimum size is 20 bytes (header without data) and the maximum is 65,535 bytes. All hosts are required to be able to reassemble datagrams of size up to 576 bytes, but most modern hosts handle much larger packets.

Explanation: Hopefully this helps you with what ever u are doing.

7 0
3 years ago
Here is over 40pts as Promised? :)<br> Who invented the Lamborghini?
nordsb [41]

Ferruccio Lamborghini

He is the creator/inventor of the Lamborghini.

3 0
4 years ago
Read 2 more answers
How is VoIP similar to traditional telephone services? How is it different?
Elis [28]

Answer:

Explanation::::::

5 0
3 years ago
Ayuda pliz es para ya!!!!!<br> nesesito un codigo html que me muestre este texto
BartSMP [9]
Sorry I don’t understand your language I wish I could help you but I just don’t understand

3 0
3 years ago
Other questions:
  • Visual images taken directly from a source, such as pictures, charts, and graphs do not need a citation. true or false.
    8·1 answer
  • Every time you are asked to work with others, you are being asked to:
    6·2 answers
  • Explain the usage of the keywordtransient?
    9·1 answer
  • What is VoIP?
    5·1 answer
  • Write a file path for a document file that is saved on the F drive then a folder called homework, then a folder called math. The
    12·1 answer
  • Which of the following is NOT a type of cable used in wired networks?a) Unshielded coaxialb) Coaxialc) Unshielded twisted-paird)
    12·1 answer
  • John just bought a used iPad from a friend who had lost the charging cable. John notices that the cable is like the charging cab
    10·1 answer
  • Is Missouri a free state or a slave state​
    13·2 answers
  • What is networking??????????????????????
    8·1 answer
  • How to start the ms excel​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!