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
Which of the following tabs on the Ribbon contains the commands for adding tables, pictures and shapes into a publication? Quest
kipiarov [429]

Answer:

it is insert

Explanation:

4 0
2 years ago
Write an application that determines the value of the coins in a jar and prints the total in dollars and cents. Read integer val
pantera1 [17]

Answer: Result:Enter the number of quarters in the jar: 4

Enter the number of dimes in the jar: 5

Enter the number of nickels in the jar: 2

Enter the number of pennies in the jar: 5

Total value is 1 dollars and 65 cents

Explanation: import java.util.Scanner;public class Coins { public static void main(String[]args) { int quarters, dimes, nickels, pennies; int total;Scanner scan = new Scanner (System.in);System.out.print("Enter the number of quarters in the jar: "); quarters = scan.nextInt();System.out.print("Enter the number of dimes in the jar: ");dimes = scan.nextInt(); System.out.print("Enter the number of nickels in the jar: ");nickels= scan.nextInt(); System.out.print("Enter the number of pennies in the jar: ");pennies = scan.nextInt(); int total_cents = 25*quarters + dimes*10 + nickels*5 + pennies;total =total_cents/100;total_cents = total_cents %100;System.out.println("Total value is " + total + " dollars and " + total_cents + " cents ");}}

Result:Enter the number of quarters in the jar: 4

Enter the number of dimes in the jar: 5

Enter the number of nickels in the jar: 2

Enter the number of pennies in the jar: 5

Total value is 1 dollars and 65 cents

4 0
2 years ago
Read 2 more answers
What is the velocity of a 0.100kg car with a momentum of 5 kgm/s?
Cerrena [4.2K]

Answer:

v = 50 m/s

Explanation:

p = mv

5 = 0.1v

v = 50

4 0
2 years ago
The packets used to transmit voice on the Internet are similar to the packets that are used to send email. What are some of the
Alona [7]

Answer:

Quality of service (QOS).

Explanation:

In recent computer networking, the convergence of voice, video and text data packet has been made possible. There is no need for a dedicated network for a particular type of packet.

QOS or quality of set is a service rendered to voice or audio packets in VoIP phones to enhance communication.

The email is a digital mailing system that can be used to send all three packets. It enjoys the QOS as voice packets. It is given high preference for transmission and uses the TCP protocol to transmit data reliably.

8 0
2 years ago
(a)Ms word is a isa word processing software ,(b)hub provides physical connection between all computers, State true or false​
8090 [49]

Answer:

true

Explanation:

true in answer in the question

8 0
2 years ago
Read 2 more answers
Other questions:
  • I plugged my phone up into a charger, the charger sparked and i unplugged my phone and now it wont charge at all, does anyone kn
    13·1 answer
  • Which of the following STEM discoverers is known for creating complex computational physics to develop computer models to simula
    7·1 answer
  • Bullets in a text box will do which of the following?
    9·2 answers
  • Write a method that take an integer array as a parameter and returns the sum of positive odd numbers and sum of positive even nu
    13·1 answer
  • To save and store data separate from a computer, it helps to have an
    15·2 answers
  • Ok so this question is kinda weird but does anyone know what google drive is. If so how do you upload a video to it?
    11·2 answers
  • Which operating system (OS) is used to run your laptop?
    15·2 answers
  • QUESTION 10
    10·2 answers
  • How can i fix a all white phone screen
    11·2 answers
  • Anyone trying to play fortnite ? im bored lol
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!