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
Thepotemich [5.8K]
3 years ago
14

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
Computers and Technology
1 answer:
Dafna11 [192]3 years ago
3 0

Answer:

for (char outerChar='a'; outerChar<='e'; outerChar++){

for (char innerChar='a'; innerChar<='e'; innerChar++){

cout << outerChar << innerChar << "\n";

}

}

You might be interested in
When working in Photoshop with the move tool, you can select multiple layers and use this option to arrange them into a straight
wel

Answer:

Distribute -  will put all of the layers in a straight line across the image

6 0
4 years ago
Read 2 more answers
16. Budget Analysis Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop shoul
strojnjashka [21]

Answer:

import java.util.Scanner;

public class num8 {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter month's budget");

       double monthBudget = in.nextDouble();

       double totalExpenses = 0.0;

       double n;

       do{

           System.out.println("Enter expenses Enter zero to stop");

           n = in.nextDouble();

           totalExpenses += n;

       }while(n>0);

       System.out.println("Total expenses is "+totalExpenses);

System.out.println("The amount over your budget is "+ Math.abs(monthBudget-totalExpenses));

   }

}

Explanation:

  • Using Java programming language
  • Prompt user for month's budget
  • Use Scanner class to receive and store the amount entered in a variable
  • Use a do while loop to continuously request user to enter amount of expenses
  • Use a variable totalExpenses to add up all the expenses inside the do while loop
  • Terminate the loop when user enters 0 as amount.
  • Subtract totalExpenses from monthBudget and display the difference as the amount over the budget

6 0
3 years ago
Which diagrams represent how roles can affect careers and lifestyles
igomit [66]
Need to post the diagrams...

3 0
3 years ago
True or False
OverLord2011 [107]

Answer:False

Explanation:

7 0
3 years ago
If you are going to refer to a few dozen classes in your application, how do<br> you do it?
natima [27]

Answer:

Explanation:

use the  "includes" statement  to have access to those classes  :)

3 0
3 years ago
Other questions:
  • How many possible mac addresses are there?
    5·1 answer
  • You store sensitive data on your computer and need to restrict access to this data by others who use your computer. What will yo
    15·1 answer
  • Write a method that returns the sum of all the elements of an array of ints that have an odd index.
    5·1 answer
  • What is the default view in a Word document?
    10·2 answers
  • _____ are the most fundamental components of designing a training program that determine the amount of stress placed on the body
    6·1 answer
  • It's about a truth table. No need to draw tables, 3 rows for the 3 columns is enough. Pls answer.
    10·1 answer
  • Sierra needs to ensure that when users are entering data into a datasheet or form that they are limited in the values they can s
    15·2 answers
  • Where does Reiner take eren after they have a fight?
    7·2 answers
  • Peter has recently bought a media player and a digital camera. He wants to buy a memory card for these devices. Which memory dev
    11·1 answer
  • your organization has decided to use dhcp for ipv6. you want all windows 10 systems using ipv6 to get all of their tcp/ip inform
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!