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
Lady bird [3.3K]
3 years ago
7

In java Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. Ex:

printFeetInchShort(5, 8) prints: 5' 8" Hint: Use \" to print a double quote.
import java.util.Scanner;

public class HeightPrinter {

/* Your solution goes here */

public static void main (String [] args) {
printFeetInchShort(5, 8);
System.out.println("");

return;
Computers and Technology
1 answer:
USPshnik [31]3 years ago
3 0

Answer:

   public static void printFeetInchShort(int numFeet, int numInches) {

       System.out.println(numFeet+"\'"+ numInches+"\"");

   }

Explanation:

To format the output properly, make use of the excape sequences (\' and \'') with string concatenation.

The complete code is given below:

public class StringLength {

   public static void printFeetInchShort(int numFeet, int numInches) {

       System.out.println(numFeet+"\'"+ numInches+"\"");

   }

   public static void main(String[] args) {

       printFeetInchShort(5, 8);

       System.out.println("");

   }

}

You might be interested in
Select the correct answer from each drop-down menu.
tia_tia [17]

Answer:

<dd> tag is used

Explanation:

The <dd> tag is used in HTML document to explain set of terms. The <dd> tag list is used in conjunction with the <dl> term. Inside a <dd> tag we can insert text, sentence, paragraph or links. There are 4 primary tags to build any website. Every HTML document begins and ends with HTML tag.

6 0
3 years ago
Creating and modifying sets.
dsp73

Answer:

Explanation:

The following Python code asks the user for inputs for the name to remove and add in the set. It then tries to remove the given name from the list. If it fails it prints out to the user saying that the name does not exist. If it does exist then it removes the name and adds the new name. Finally it prints out the current list of names.

male_names = {'oliver', 'Declan', 'Henry'}

name_to_remove = input("Enter name to remove: ")

name_to_add = input("Enter name to add: ")

try:

   male_names.remove(name_to_remove)

   male_names.add(name_to_add)

except:

   print("Name that you are trying to remove does not exist")

print("List of Names: ")

print(male_names)

4 0
3 years ago
Select all the correct answers.
Rasek [7]

Answer:

number formatting,

scientific analysis computer programming

6 0
3 years ago
One way to add a table to a presentation is to click on Clip Art under the Insert tab. click on WordArt under the Insert tab. ri
SpyIntel [72]
Huh? What is this? …..
7 0
3 years ago
List the seven steps used by a laser printer to print a page
Schach [20]
T<span>he seven steps used by a laser printer to print a page are :
</span>1)  Processing, this is where he computer sends the data to the printer.
2)  Charging, where <span>the wire (primary corona) negatively charges the
     photoconductive drum.</span>
3)  Exposing, where <span>the laser scans the image to the drum. Anywhere the
     laser touches the drum causes the electrical charge to drain off.</span>
4)  Developing, where <span>negatively charged toner particles are allowed to
     attach to the painted area of the drum; since the negative charge has
     been drained off these areas</span>
5) Transferring, where the transfer corona wire charges the paper with a
     positive charge from behind. The negatively charged toner jumps to the
     positive paper, according to the image on the drum. <span>A Static Charge
     eliminator then removes any residual charge.
</span>6) Fusing, where t<span>he toner particles attached to the paper are fused or
     melted to the paper, because of the heated drum.</span>
7) Cleaning, where t<span>he drum is cleaned of excessive toner and electrical
    charges.</span>
7 0
3 years ago
Read 2 more answers
Other questions:
  • Southern States<br> Wanted...<br> But...<br> So...
    12·1 answer
  • You are given a data set with information from 1,000 high school students (of which the following is a part of the data) and ask
    6·1 answer
  • If you interview a dentist to learn about her experiences on the job, she is considered a secondary source of information. Pleas
    7·2 answers
  • 6. Write a program that can multiply an n x m matrix and m x n matrix together: The input specifications are these: Read n and m
    11·1 answer
  • Why isn't my brainly camera working? I got Brainly Plus and can't even scan questions. I've logged out, I've uninstalled and rei
    14·1 answer
  • What are the four common tags used on webpages?
    11·1 answer
  • To switch from one open document to another, press _____.
    6·1 answer
  • What is the definition of bug?​
    11·1 answer
  • The way a student prepares for a test or reviews academic material is referred to as
    8·2 answers
  • How can knowing internal and external parts of computer help me
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!