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
OleMash [197]
4 years ago
14

Output all combinations of character variables a, b, and c. If a = 'x', b = 'y', and c = 'z', then the output is: xyz xzy yxz yz

x zxy zyx Your code will be tested in three different programs, with a, b, c assigned with 'x', 'y', 'z', then with '#', '$', '%', then with '1', '2', '3'.
Engineering
1 answer:
gladu [14]4 years ago
7 0

Answer & Explanation:

//written in java

public class Main {

   public static void main(String[] args) {

       //declare a char variable for a, b, c

       char a;

       char b;

       char c;

       //assign a b and c

       //a b and c can be replaced for with  

       // '#', '$', '%', then with '1', '2', '3'

       // for further testing

       a = 'x';

       b = 'y';

       c = 'z';

       //output for all possible combination for a, b, c.

       System.out.println("" + a + b + c + " " + a + c + b + " " + b + a + c +

               " " + b + c + a + " " + c + a + b + " " + c + b + a);

   }

}

You might be interested in
List everything wrong with 2020
natita [175]
Everything wrong with 2020 is WW3 that dump trump decided to start , Australia fires , Kobe passed away than Pop smoke :( corona virus got really big , quarantine started , riots & protesting started because of that dumb who’re racist cop ! Hope this helps
6 0
3 years ago
Read 2 more answers
Write a C++ program to display yearly calendar. You need to use the array defined below in your program. // the first number is
ddd [48]

Answer:

//Annual calendar

#include <iostream>

#include <string>

#include <iomanip>

void month(int numDays, int day)

{

int i;

string weekDays[] = {"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"};

// Header print

      cout << "\n----------------------\n";

      for(i=0; i<7; i++)

{

cout << left << setw(1) << weekDays[i];

cout << left << setw(1) << "|";

}

cout << left << setw(1) << "|";

      cout << "\n----------------------\n";

      int firstDay = day-1;

      //Space print

      for(int i=1; i< firstDay; i++)

          cout << left << setw(1) << "|" << setw(2) << " ";

      int cellCnt = 0;

      // Iteration of days

      for(int i=1; i<=numDays; i++)

      {

          //Output days

          cout << left << setw(1) << "|" << setw(2) << i;

          cellCnt += 1;

          // New line

          if ((i + firstDay-1) % 7 == 0)

          {

              cout << left << setw(1) << "|";

              cout << "\n----------------------\n";

              cellCnt = 0;

          }

      }

      // Empty cell print

      if (cellCnt != 0)

      {

          // For printing spaces

          for(int i=1; i<7-cellCnt+2; i++)

              cout << left << setw(1) << "|" << setw(2) << " ";

          cout << "\n----------------------\n";

      }

}

int main()

{

int i, day=1;

int yearly[12][2] = {{1,31},{2,28},{3,31},{4,30},{5,31},{6,30},{7,31},{8,31},{9,30},{10,31},{11,30},{12,31}};

string months[] = {"January",

"February",

"March",

"April",

"May",

"June",

"July",

"August",

"September",

"October",

"November",

"December"};

for(i=0; i<12; i++)

{

//Monthly printing

cout << "\n Month: " << months[i] << "\n";

month(yearly[i][1], day);

if(day==7)

{

day = 1;

}

else

{

day = day + 1;

}

cout << "\n";

}

return 0;

}

//end

3 0
4 years ago
A tension test is carried out on an Al alloy specimen which has an original diameter of 0.505 in and an original gauge length of
Contact [7]

Answer:

Detailed solution is given in attached image

5 0
3 years ago
The three resistors in the circuit shown have values of 4ohms 4ohms and 2ohms. The battery has a value of 12 volts. What is the
gtnhenbr [62]

Answer:

2ohms

Explanation:

3 0
3 years ago
Which of the following is true about modern hydraulic lifts?
kaheart [24]

The modern hydraulic lifts make use of biodegradable fluid to transmit hydraulic power

<em>Question: The options are left out in the question. The details and facts about the modern hydraulic lift are presented here</em>

<em />

Details about the modern hydraulic lifts include;

The development of the  modern hydraulic occurred in the Industrial Revolution to perform task done previously by steam powered elevators  

The power of the hydraulic lift come from the hydraulic cylinder known as the actuator, which in turn is powered by pressurized hydraulic fluid such as oil

The hydraulic fluid is pushed by a piston rod through which energy is capable of being transferred, such that the applied force is multiplied, to provide more power for lifting

<u>Facts about the modern hydraulic lifts include;</u>

  • The dry motor in the modern hydraulic lift is more efficient and consumes 20% less energy
  • It comprises of valves that are controlled electronically such that the response is much rapid and the energy consumption is reduced by a further 20%
  • The cars used in the modern lift are lighter, as well as the slings, which reduces the power usage by 20%
  • It makes use of chemicals which are environmentally friendly as hydraulic fluid
  • The flash point of the fluid used is higher, as well as it posses 50% lower compressibility as well elasticity

Learn more here:

brainly.com/question/16942803

6 0
2 years ago
Other questions:
  • For the R function shown below(Attachment):
    5·1 answer
  • Two forces, one of which double the other has resultant of 280N. if the direction of the large force is reversed and the remaini
    6·1 answer
  • Define ""acidity"" of an aqueous solution. How do you compare the strength of acidity of solutions ?
    6·1 answer
  • A stainless-steel specimen from the same material characterized up above, was formed into a rectangular cross-section of dimensi
    9·1 answer
  • Create a C language program that can be used to construct any arbitrary Deterministic Finite Automaton corresponding to the FDA
    6·1 answer
  • What is the relationship between orifice diameter and pipe diameter​
    15·1 answer
  • The natural material in a borrow pit has a mass unit weight of 110.0 pcf and a water content of 6%, and the specific gravity of
    11·1 answer
  • Two kilograms of air in a piston-cylinder assembly undergoes an isothermal
    11·1 answer
  • Complete the following sentence.
    10·1 answer
  • What do you mean by overflow and underflow error in array?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!