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]
4 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]4 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
Complete the sentences describing a computer innovation.
dolphi86 [110]

Answer:

Collaboration

4 0
3 years ago
Which of the following describes the term "false information?"
pav-90 [236]
Inaccurate and misleading
3 0
4 years ago
<img src="https://tex.z-dn.net/?f=%20%5C%3A%20" id="TexFormula1" title=" \: " alt=" \: " align="absmiddle" class="latex-formula"
Effectus [21]

Answer:

\tt \green{The \: elements }  \: of \:  \red{computer }  \: \blue{are:}

•Hardware

•Software

•Data

•Procedures

•Input Unit

•Output Unit

•CPU(Central Processing Unit)

•Connectivity

•Primary Memory

•Motherboard

•GPU(Graphics Processing Unit)

•Solid State Drive (SSD) or Hard Disk Drive (HDD)

•RAM

Explanation:

\tt \pink{HeavenMistress}

5 0
2 years ago
Read 2 more answers
It is very difficult to enter the stock and microstock photography area. True False
podryga [215]

Answer:

False.

It is not very difficult to enter the stock and microstock photography area.

Explanation:

  • Micro stock photography is the term given to the the photo industry with royalty free or very low priced photographs.
  • After you get accepted in the industry you can easily start sharing your photographs in the stock photography field.
  • You can send your sample on the stock photography websites like, Shutterstock.
  • Overall if you have that skill and passion, it is not that hard job to become a stock photographer.
5 0
4 years ago
Full virtualization is ideal for ___________. Migration capacity Computer system sharing,isolate users Disaster recovery Data re
Usimov [2.4K]

Answer:

Computer system sharing, isolate users

Explanation:

Full virtualization is ideal for "Computer system sharing, isolate users." This is evident in the fact that Full virtualization is a technique in which data are shared between operating systems and their hosted software. This strategy is then carried out from the top of the virtual hardware.

Also, the full virtualization strategy in computer service requests is distinguished from the physical hardware that enables them.

Hence, in this case, the correct answer is "Computer system sharing, isolate users."

3 0
3 years ago
Other questions:
  • Is a type of software program used to write code and develop other
    9·1 answer
  • In what way do networks help to protect data?
    7·2 answers
  • (tco 9) the most common protocol(s) used for sending and retrieving e-mail is(are) _____.
    11·1 answer
  • Which of the following are vector graphic file formats? Choose all that apply.
    5·1 answer
  • During his last performance review, Franco's boss urged him to set some short-term and long-term sales goals to help him perform
    6·2 answers
  • E-mail messages, instant messages (IMs), or text messages sent and/or received within an organization a. are not included on a r
    9·1 answer
  • What animal does maleficent transform into in order to defeat prince phillip?
    13·2 answers
  • Think of an aspect of HTML that you found challenging to master. Why is that aspect of HTML important? What are some future situ
    6·1 answer
  • What is the most common representation of a distribution?
    14·1 answer
  • Write a C console application that will be used to determine if rectangular packages can fit inside one of a set of spheres. You
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!