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
vagabundo [1.1K]
3 years ago
8

Given two input integers for an arrowhead and arrow body, print a right-facing arrow. Ex: If the input is 0 1, the output is

Engineering
1 answer:
Lyrx [107]3 years ago
8 0

For printing a right facing with input 01, define the class for right facing arrow and give the value with appropriate space using '%6d'  and then display the right facing arrow.

Further Explanation:

The code to print the arrowhead and arrow body is as follows:

Import java.util.Scanner;

//Define the method.

public class RightfacingArrow

{

//Define the main method.

public static void main(String[] args)

{

//Create an object of Scanner class.

Scanner object = new Scanner(System.in);

//Declare the variables.

int baseChar;

int headChar;

//Prompt the user to enter the input values.

baseChar = object.nextInt();

headChar = object.nextInt();

 

//Display the headchar in position 6 from the  starting.

System.out.printf("%6d ", headChar);

//Display the arrows.

System.out.println(baseChar+""+baseChar+""

+baseChar+""+baseChar+""+baseChar+""

+headChar+""+headChar);

System.out.println(baseChar+""+baseChar

+""+baseChar+""+baseChar+""+baseChar

+""+headChar+""+headChar+""+headChar);

System.out.println(baseChar+""+baseChar

+""+baseChar+""+baseChar+""

+baseChar+""+headChar+""+headChar);

//Display the headchar in position 6 from the  starting.

System.out.printf("%6d ", headChar);

}

}

Output:

If the input is 01, the output will be as below:

    1

0000011

00000111

0000011

    1

Learn more:

1. A company that allows you to license software monthly to use online is an example of ? brainly.com/question/10410011  

2. Prediction accuracy of a neural network depends on _______________ and ______________. brainly.com/question/10599832  

Answer details:

Grade: College Engineering

Subject: Computer Science and Enginnering

Chapter: Java Programming

Keyword:

Java, input, output, programming, statements, if-else, loops, print, scan. right facing arrows, body, main body, char, int, variables, scanner class, abstract class, constructor, desctructor

You might be interested in
Dimensioning a drawing means​
lara [203]

Answer:

Dimensioning a drawing refers to drawing a dimension for every side of the figure.  It means to write the lengths of every side in the figure(2D or 3D)

<em>Hope it helps <3</em>

7 0
3 years ago
25 points and brainiest if correct A, B, C, D
hoa [83]

Answer:

A. Juna's answer is correct because both the number of feet and the number of inches are correct

Explanation:

3 0
3 years ago
Read 2 more answers
Name their temperaments:
elena55 [62]

Answer:

Hillary Clinton

president Donald Trump

Explanation:all want to vie for presidency

8 0
3 years ago
Sheet metal cutting operation along a straight line between two cutting edges is called Shearing Operation's. a)- True b)-False
AURORKA [14]

Answer: True

Explanation: The process in sheet metal which separates the metal sheet in straight line by cutting is known as shearing operation.The process of shearing is carried out by application of shearing forces on the metal sheet. this operation separates the metal sheet into two parts by the edges. They have the certain limited tolerance. Therefore the given statement in the question is true.

8 0
4 years ago
How many robots does bailey nursery own ​
givi [52]

Answer:

The Bailey family has flourished during its business’ 110-year history. But Bailey Nurseries’ leaders still operate with the belief that the family doesn’t always know best. The company has grown from a one-man operation selling fruit trees and ornamental shrubs to one of the largest wholesale nurseries in the United States, thanks to insights from those who are family and those who aren’t.

“For a business to thrive, you have to ask for outside help,” says Terri McEnaney, president of the Newport-based company and a fourth-generation family member. “We get an outside perspective through family business programs, advisors and our board, because you can get a bit ingrained in your own way of thinking.”

When Bailey Nurseries chose its current leader in 2000, it brought in a facilitator who gathered insights from key employees, board members and owners. Third-generation leaders (and brothers) Gordie and Rod Bailey picked Rod’s daughter McEnaney, who had experience both inside and outside the company.

Explanation:

5 0
3 years ago
Other questions:
  • Write a function that multiplies two decimal string representations of non-negative integers. The function takes two parameters
    9·1 answer
  • 1- Design a brute-force algorithm for solving the problem below (provide pseudocode): You have a large container with storage si
    6·1 answer
  • A 50 Ibm block is moving at 4 ft/s. Find Its total kinetic energy? Also find Its kinetic energy per unit mass is
    13·1 answer
  • A system has a level 1 cache and a level 2 cache. The hit rate of the level 1 cache is 90% and the hit rate of the level 2 cache
    9·1 answer
  • Analysis of the relationship between the fuel economy​ (mpg) and engine size​ (in liters) for 35 models of cars produces the reg
    15·1 answer
  • Describe the operation of a pneumatic robot controlled by a drum
    10·1 answer
  • What makes building an airplane while flying so difficult?
    5·1 answer
  • Consider a rectangular wing mounted in a full-scale wind tunnel. The wing model completely spans the test section so that the fl
    6·1 answer
  • A O.1m³ rigid tank contains steam initially as 500k pa and 200°C. The steam is now allowed to cool until the temperature drops t
    7·1 answer
  • What information you would gain by watching the video. Plz Help due today.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!