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

Define a function PrintFeetInchShort, with int parameters numFeet and numInches, that prints using ' and " shorthand.

Computers and Technology
1 answer:
Kisachek [45]3 years ago
5 0

Answer:

I am writing a function using C++ programming language. Let me know if you want the program in some other programming language.

void PrintFeetInchShort(int numFeet , int numInches){

   cout<<numFeet<<"\' "<<numInches<<"\"";

The above function takes two integer variables numFeet and numInches as its parameters. The cout statement is used to print the value of numFeet with a single quote at the end of that value and  print the value of numInches with double quotes at the end of that value. Here \ backslash is used to use the double quotes. Backslash is used in order to include special characters in a string. Here i have used backslash with the single quote as well. However it is not mandatory to use backslash with single quote, you can simply use cout<<numFeet<<"' " to print a single quote. But to add double quotes with a string, backslash is compulsory.

Explanation:

This is the complete program to check the working of the above function.

#include <iostream>  // to use input output functions

using namespace std;   //to identify objects like cout and cin

void PrintFeetInchShort(int numFeet , int numInches){

//function to print ' and ' short hand

   cout<<numFeet<<"\' "<<numInches<<"\"";  }

int main() { //start of the main() function body

  PrintFeetInchShort(5, 8);    }

//calls PrintFeetInchShort() and passes values to the function i.e. 5 for //numFeet  and 8 for numInches

If you want to take the values of numFeet and numInches from user then:

int main() {

   int feet,inches;  // declares two variables of integer type

   cout<<"Enter the value for feet:"; //prompts user to enter feet

   cin>>feet;  //reads the value of feet from user

   cout<<"Enter the value for inch:";   //prompts user to enter inches

   cin>>inches;      //reads the value of inches from user

  PrintFeetInchShort(feet, inches);   } //calls PrintFeetInchShort()

The screenshot of the program and its output is attached.

You might be interested in
Program planning for the best may include therapy, effective discipline strategies, crisis treatment, and/or family counseling.
Doss [256]

thats called dcs .........................


6 0
4 years ago
Read 2 more answers
A copy machine is available 24 hours a day. On a typical day, the machine produces 100 jobs. Each job takes about 3 minutes on t
Hoochie [10]

Answer:

13.3%

Explanation:

OEE= Availability × Performance × Quality

Availability = Run Time/ Planned Production Time

Run time = 3*100 = 300 + 0.2* 300 = 1.2 *300 = 360 mins

Planned Production time = 24*60 = 1440 mins

Availability = 360/1440 = 1/4 = 25%..............1

Performance = (Ideal Cycle Time × Total Count) / Run Time

Ideal Cycle Time = 2 min (Only the processing time)

Total Count= 100+20 = 120

Performance = 2*120/360 =66.67% .............2

Quality = 100%-20% = 80%.......3

Frpm 1,2,3

OEE=25% * 66.67 % * 80% =

0.13334=13.3%

4 0
4 years ago
BlockPy: #38.2) While Input Use a while loop to repeatedly take input from the user and print whatever they type in. When the us
BARSIC [14]

Answer:

strr=input("please enter something: ")

while strr is not "":

   print(strr)

   strr=input("please enter something: ")

Explanation:

whenever the user will enter an empty string the loop will terminate

8 0
4 years ago
Which memory device is most appropriate for backing up a computer’s hard drive?
Luba_88 [7]
It depends on how much storage. I usually connect mine to another hard drive.
4 0
4 years ago
In the context of customer relationship management (CRM) applications, which approach is often chosen by organizations with an e
Bad White [126]

The on-premise approach is often chosen by organizations with an established IT infrastructure.

<h3>What is the On Premises?</h3>

In an on-premises method, resources are said to be given or deployed in-house and it is one that is found within an enterprise's IT infrastructure.

Customer relationship management (CRM) is known to be a form of a technology that is often used in the act of managing all of a firm's  relationships and communications with customers and also that of potential customers.

Therefore, The on-premise approach is often chosen by organizations with an established IT infrastructure.

Learn more about CRM from

brainly.com/question/27373018

#SPJ1

5 0
2 years ago
Other questions:
  • Why do local variables lose their values between calls to the function in which they are
    5·1 answer
  • Which of the following apply to the definition of Wide Area Networks? Check all of the boxes that apply.
    7·2 answers
  • In a client/server architecture, an optional _____ is sometimes used to pass bulk information to the server. a. request line b.
    8·1 answer
  • A license plate consists of 2 letters followed by 1 digit. How many license plates are possible if the first letter can be any l
    13·1 answer
  • State reasons why new version of application packages are released often?​
    11·2 answers
  • Easy Bib and Cite This For Me are examples of online
    12·1 answer
  • Help<br><br> My internet won't work on my other pc i tried a lot to get it back
    9·2 answers
  • Generally speaking, problems are rarely caused by motherboards. However, there are some instances in which a motherboard can fai
    12·1 answer
  • OSI layer for HDLC??​
    13·1 answer
  • Which is the fastest memory in computer​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!