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
ExtremeBDS [4]
3 years ago
7

Define a method printFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand. End with a n

ewline. Ex: printFeetInchShort(5, 8) prints: 5' 8" Hint: Use \" to print a double quote.

Computers and Technology
2 answers:
umka2103 [35]3 years ago
8 0

Answer:

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

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

  }

Explanation:

Don't forget the brace!

worty [1.4K]3 years ago
4 0

Answer:

The program to this question as follows:

Program:

//header file

#include <iostream> //defining header file

using namespace std;

void printFeetInchShort(int numFeet,int numInches); //decalring method printFeetInchShort  

void printFeetInchShort(int numFeet,int numInches)//defining method printFeetInchShort

{

cout<<"height: "; // print message

cout<<numFeet<<"\'"<<""<<numInches<<"\""; //print value

}

int main() //defining main method

{

int numFeet, numInches; //defining integer variable

cout<<"Enter height feet: "; //print message

cin>>numFeet; //input value by user

cout<<"Enter height inches: "; //print message

cin>>numInches; //input value by user

printFeetInchShort(numFeet,numInches); //calling method printFeetInchShort    

return 0;

}

Output:

Enter height feet: 5

Enter height inches: 9

height: 5'9"

Explanation:

In the above C++ language program, first, a header file is included, that uses the basic function, in the next step, the "printFeetInchShort()" method is defined, in the method two integer variables passed as a parameter, inside this method a print function "cout" is used, that print user input value with single and double quote.

Then the main method is declared, inside this method two integer variables "numFeet and numInches" are defined, which is used to take input value by user and pass the value in "printFeetInchShort()" function parameter and call the function.

You might be interested in
A program has a infinite while loop. How can you interrupt it?
MrRa [10]

Answer:

The <em>break</em> keyword is how you interrupt a while loop.

the syntax looks like this ↓

Python ↓

while <em>true</em>:

<em>break</em>

Java script ↓

while (<em>true</em>);

<em>break</em>

6 0
2 years ago
The ____ is the ranking executive on-site when the crisis or emergency arises, who is authorized to initiate the CM plan.
aleksklad [387]

The answer is the Executive-in charge

The concept of an Executive-in charge came from the military’s chain of command. A chain of command ranges from a supervisor to the top executive of the organization. When a crisis arises, it is possible that one or more of the senior top managers may not be available for consultations because of the travel-intensive positions.






7 0
3 years ago
Read 2 more answers
What is the name of this tool and what can it be used for?<br> Thanks!!
Iteru [2.4K]
That is a corqet tool it is used for fixing tires
6 0
3 years ago
A poem for coduction
Nataly_w [17]
I don't know if you want a poem about conduction but if so here ya go

no matter how the heat
different temperatures meet
hot to cold how it's done
4 0
3 years ago
Read 2 more answers
How many comparisons will be made to find 8 in this list using a linear search?
Kobotan [32]

Answer:

4

Explanation:

4

6 0
2 years ago
Other questions:
  • Are the actions legal or illegal?
    13·1 answer
  • What is the real meaning of hack and crack?
    6·1 answer
  • Explain how software is distinct from hardware.
    8·2 answers
  • A) Write 600 as the product of prime factors.<br> Give your answer in index form.
    7·2 answers
  • What is the quickest way to change the format of a table?
    8·1 answer
  • A home user reports to a network technician that the Internet is slow. The network administrator discovers that multiple unknown
    12·2 answers
  • What is the term for the part of a browser responsible for reading and processing programming languages?
    10·1 answer
  • jeff has just upgraded from windows 7 to windows 10 and he is confused. He has started several universal apps but he can't figur
    11·1 answer
  • A _____ is the viewing area for a web page, which is much smaller on a phone than on a traditional desktop.
    7·1 answer
  • Compared to using a command line, an advantage to using an operating system that employs a gui is ________.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!