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
oe, a user, receives an email from a popular video streaming website. the email urges him to renew his membership. the message a
ale4655 [162]

Where Joe, a user, receives an email from a popular video-streaming website and the email urges him to renew his membership. If the message appears official, but Joe has never had a membership before, and if when Joe looks closer, he discovers that a hyperlink in the email points to a suspicious URL, note that the security threat that this describes is: "Phishing" (Option B)

<h3>What is Phishing?</h3>

Phishing is a sort of social engineering in which an attacker sends a fake communication in order to fool a person into disclosing sensitive data to the perpetrator or to install harmful software, such as ransomware, on the victim's infrastructure.

To avoid phishing attacks, make sure you:

  • understand what a phishing scheme looks like
  • Please do not click on that link.
  • Get anti-phishing add-ons for free.
  • Don't provide your information to an untrusted website.
  • Regularly change passwords.
  • Don't disregard those updates.
  • Set up firewalls.
  • Don't give in to those pop-ups.

Learn more about Phishing:
brainly.com/question/23021587
#SPJ1

Full Question:

Joe, a user, receives an email from a popular video streaming website. The email urges him to renew his membership. The message appears official, but Joe has never had a membership before. When Joe looks closer, he discovers that a hyperlink in the email points to a suspicious URL.

Which of the following security threats does this describe?

  • Trojan
  • Phishing
  • Man-in-the-middle
  • Zero-day attack
5 0
2 years ago
What should you do if your computer keeps shutting down while working? Make sure your anti-virus software is running and up-to-d
olganol [36]
The answer is either A. or B. <span />
5 0
3 years ago
Read 2 more answers
MD5 uses a hash value to create a hash which is typically a 32 character hex number and how many bits?
ryzh [129]

Answer:

128 bits

Explanation:

The MD5, which is the acronym for Message-Digest algorithm 5, invented by a professor of MIT, Ronald Rivest, is a cryptographic hash algorithm that creates a 128 bit hash value and is typically represented as a 32 character hex number. MD5 is the improved version of MD4 which was also created by the same professor.

Following is an example format of an MD5 hash;

<em>ef55d3a698d289f2afd663725127bccc</em>

MD5 has been proven to have security issues. One of these issues is called collision attack - a situation where the same hash is produced for different input data.

8 0
4 years ago
Which section of a cover letter would include your skills education and work experience
trasher [3.6K]
Resume. I do believe
8 0
3 years ago
Read 2 more answers
Have you been tempted to do something online that you wouldn't do if<br> people knew it was you?
Aleksandr-060686 [28]

Answer

I don't know tbh, Maybe once or twice here or there.

Explanation:

6 0
3 years ago
Other questions:
  • Programmers say the data items are ____ only within the module in which they are declared.
    5·1 answer
  • A ___________ is used when an extra digit is added to a coded field to make sure it the entered data is correct (like social sec
    14·1 answer
  • To get revenge on the pizza parlor burning his pizza and not reimbursing him for it, David returned to the pizza parlor after-ho
    9·2 answers
  • 40 POINTS I NEED THESE ANSWERS ASAP GIVE ME THE RIGHT ASNWER AND ILL PUT YOU AS THE BRAINLIEST
    13·1 answer
  • Which is a feature of a strong thesis statement? A) It presents only the facts. B) It is open-ended. C) It answers the central q
    15·1 answer
  • Write a recursive function, replace, that accepts a parameter containing a string value and returns another string value, the sa
    5·1 answer
  • What is a zener diode
    8·1 answer
  • Which SCSI standard allows for the technique known as “hot swapping”? Ultra SCSI Original SCSI Serial SCSI Fast-Wide SCSI
    5·1 answer
  • Después de un incidente de seguridad del cliente, el equipo realiza un análisis en profundidad de cada paso dado por los atacant
    6·1 answer
  • How desktop case or chassis designed?, material and steps?​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!