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
When coding using the root operation Detachment, the term "ray" is used to describe a particular part of the hand and foot. What
irga5000 [103]

Answer:

Little finger or little toe.

Explanation:

The 5th ray describes little finger or little toe.

4 0
3 years ago
चार फरक छुट्याउनुहोस् ।) 3. Write down any four provisions of cyber ethic साइबर नैतिकताका कुनै चार प्रावधानहरु लेख्नुहोस् ।​
Kruka [31]

Answer:

Five provisions of cyber ethics are:

Your computer or system should not be used to harm others. Your cyber knowledge should not be used to steal other people's resources. One should not use or copy softwares for which you have not paid. ... Never use other people's resources without their consent.

7 0
3 years ago
Bruh why is everyone skipping my question!!!!!!!
DiKsa [7]

Answer:

What is your question?

Explanation:

7 0
3 years ago
What research method in sociology is also referred as fieldwork
Tanya [424]
The answer is Field research  
8 0
3 years ago
What is the full form of OS.​
Leya [2.2K]

The full word of the abbeviation OS?

It is Operating System. Like Apple's OS or Microsoft's OS.

6 0
3 years ago
Read 2 more answers
Other questions:
  • Define a function print_total_inches, with parameters num_feet and num_inches, that prints the total number of inches. Note: The
    8·1 answer
  • Which structure is sometimes called the "gateway to memory"?
    14·1 answer
  • Regularly Tuning up a computer can assist keeping it running at Peak speed. True or False?
    12·1 answer
  • Smartphones are the top target for _______ that locks a device and then requests payment for an unlocking code.
    5·1 answer
  • What is indexing ? How does it make search engines work more efficiently?
    15·1 answer
  • 3. Compilers and Assemblers translate each source file individually to generate object code files. Hence the object files need t
    13·1 answer
  • A question to determine your ability to use the reference materials effectively. Your boss has determined that you will be using
    9·1 answer
  • What is one benefit of Powerpoint Online?
    14·2 answers
  • Dana is reviewing a coworker’s presentation and wants to make note of some questionable data on a chart. What steps should she t
    5·2 answers
  • Write the necessary preprocessor directive to enable the use of the stream manipulators like setw and setprecision Additional No
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!