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
wariber [46]
4 years ago
8

Assign a variable madLib to a function expression that has five parameters in the order: an adverb, two nouns, an adjective and

a verb. The function should return a mad lib string value by substituting the parameter values into the following template:
The [adjective] [noun1] [adverb] [verb] the [noun2]. For example: madLib("quietly", "dog", "moon", "lazy", "smashed") returns "The lazy dog quietly smashed the moon.". 1 2 3 4 5 6 7 /* Your solution goes here */ /* Code will be tested once with parameters: "quietly", "dog", "moon", "lazy", "smashed", and again with parameters: "gently", "rat", "city", "bored", "became" */ console.log(madLib("quietly", "dog", "moon", "lazy", "smashed")); 1 2 3 4 Check Next 1
Computers and Technology
1 answer:
hoa [83]4 years ago
6 0

Answer:

<em>The function is written in C++:</em>

void madLib(string adjective,string noun1,string adverb,string verb,string noun2){

   cout<<"The "+verb+" "+noun1+" "+adjective+" "+noun2+" the "+adverb;

}

Explanation:

This line defines the function

void madLib(string adjective,string noun1,string adverb,string verb,string noun2){

This line generates and returns the output string

   cout<<"The "+verb+" "+noun1+" "+adjective+" "+noun2+" the "+adverb;

<em>NB: I've added the full source code as an attachment where you can test various input strings</em>

Download cpp
You might be interested in
What is the purpose of a search engine?
soldi70 [24.7K]
The purpose is to look for the topic that you need to ask a question and to find/get to a website you want to go to. hope this helped :)
4 0
4 years ago
Read 2 more answers
Which of the following is an acrostic
Darina [25.2K]
There is no option........................................
5 0
4 years ago
ASAP!!!!!!!
Sidana [21]
A .2:)())...........\\
5 0
3 years ago
Read 2 more answers
Negative numbers are encoded using the __________ technique. a. two’s complement b. floating point c. ASCII d. Unicode
OLEGan [10]

Negative numbers are encoded using the two’s complement technique. Two's complement is used to encode negative numbers.

Option  A is correct .

<h3>What method does the in data type use to store negative numbers?</h3>

Most implementations you're likely to encounter store negative signed integers in a form known as two's complement. Another important way of storing negative signed numbers is called one's complement. The one's complement of an N-bit number x is basically defined as x with all bits inverted.

<h3>What is encoding method?</h3>

An encoding technique is the application of established industry conventions to a coded character set to create a coded character scheme. Such rules determine the number of bits required to store the numeric representation of a given character and its code position in the encoding.

Learn more about two complement technique encoding :

brainly.com/question/26668609

#SPJ4

5 0
1 year ago
Do all websites use the same coding to create?
Eduardwww [97]

I think not but I'm not sure

6 0
3 years ago
Other questions:
  • ____ errors occur when a formula is written incorrectly, when a mistake is made with a decision condition, or when the wrong var
    11·1 answer
  • Question 4 (1 point)
    12·1 answer
  • How does the government is i.t to run the country?
    9·1 answer
  • Match each document to its respective type.
    8·2 answers
  • When a module is executing what happens when the end of the module is reached?
    10·1 answer
  • hey guys. I have bitmoji but the stickers just won't load. it says 'we couldn't retrieve you stickers, or says an error message.
    5·1 answer
  • What are two design elements that help MRAP trucks resist mines?
    15·1 answer
  • Mention five of the format tools use to edit a picture in a word document<br>​
    13·1 answer
  • What is game development​
    10·2 answers
  • A customer bought a goods for Rs.9,000 after getting 10% discount. Calculate the marked price of the goods.Write in Qbasic.​
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!