answer.
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
abruzzese [7]
2 years ago
14

3.34 LAB: Mad Lib - loops in C++

Computers and Technology
1 answer:
Ganezh [65]2 years ago
7 0

Answer:

A Program was written to carry out some set activities. below is the code program in C++ in the explanation section

Explanation:

Solution

CODE

#include <iostream>

using namespace std;

int main() {

string name; // variables

int number;

cin >> name >> number; // taking user input

while(number != 0)

{

// printing output

cout << "Eating " << number << " " << name << " a day keeps the doctor away." << endl;

// taking user input again

cin >> name >> number;

}

}

Note: Kindly find an attached copy of the compiled program output to this question.

You might be interested in
Longer speeches should be separated into the paragraphs of:
Virty [35]

Answer:

b) About 100 words or 3-4 fines in the transcription tool.

Explanation:

Transcription tools are the software that helps in converting the audio or speeches into texts. Traditionally, the process of transcription was done manually. With teh advancement of technologies and software, transcription software is developed. They help in transcribing the audios and videos into texts. These are useful in many sectors of business, medical, and legal areas.

One of the rules of transcription involves the division of long speeches into paragraphs. It is advised to divide the paragraph into about 100 words or 3-4 lines.

7 0
2 years ago
What language(s) must be used to display a bare-minimum web page?
Reil [10]

Answer: Hyper Text Markup Language (HTML)

Explanation:  

Computers use language to communicate, just like people do and the way that computers communicate with the internet is through a language that is called Hyper Text Markup Language/ HTML

Hyper Text is the process of linking objects to each other, so that when one object is clicked the linking object can be viewed. Hyper Text Markup Language was created by Tim burners in 1990


8 0
2 years ago
Read 2 more answers
Using Word, Maureen is writing an outline of a presentation she plans to give to her company. She will be showing a video during
Grace [21]
You don't need a tool to place images in Word. Simply paste them in your document.
5 0
2 years ago
Read 2 more answers
Type two statements that use rand() to print 2 random integers between (and including) 100 and 149. End with a newline. Ex:
rosijanka [135]

Answer:

#include <stdlib.h>

#include <time.h>

#include<iostream.h>

int main(void) {

   int seedVal = 0;  

   seedVal = 4;

   srand(seedVal);

  /* Solution*/

  cout<<rand() % 149 + 100<<endl;

  cout<<rand() % 149 + 100<<endl;

  return 0;

}

Explanation:

We start with the required include statements to enable use of srand, rand and time functions. I have also added iostream library to use "cout" function.

After that, the seed is initialized using srand(). And then the two rand functions are called with ranges including and between 100 and 149, and printed out.

6 0
2 years ago
Read 2 more answers
The Gas-N-Clean Service Station sells gasoline and has a car wash. Fees for the car wash are $1.25 with a gasoline purchase of $
beks73 [17]

Answer:

d = {"R":2.89,"P":3.09, "S":3.39, "N":0}

noofgallons = input("Enter number of Gallons:")

gastype = input("Enter Gas type/; R,P,S,N")

cwr = input("Is Car Was Requieed")

if(gastype == "R"):

   gal == nooffgallons * d['R']

   if (cwr=="y" and gal<10):

       gal+=3.00;

       elif(cwr=="y" and gal>=10):

           gal+=1.25

           elif(cwr=="n"):

               gal=gal

   elif(gastype==P):

       gal== nooffgallons * d['P']

       if(cwr="y" and gal<10):

           gal+=3.00;

           elif(cwr=="y"and gal>=10):

           gal+=1.25

           elif(cwr=="n"):

               gal=gal

       elif(gastype ==S):

           gal=noofgallons *d['S']

           if(cwr="y" and gal<10):

               gal+=3.00;

               elif(cwr=="y"and gal>=10):

                   gal+=1.25

                   elif(cwr=="n"):

                       gal=gal

                       

                       

print("tptal cost paid"+ gal)

The above program uses a dictionary for storing gasoline types and their cost, and dictionary is always constant, and hence its fulfilled the requirement of keeping it constant. And car wash is treated accordingly. And if elif else ladder has been used to calculate the total number of gallons.

Rest part is self explanatory.

Explanation:

The code is self explanatory.

7 0
2 years ago
Other questions:
  • Name an analog quantity other than temperature and sound.
    14·1 answer
  • Hybrid processors that can process 32 bits or 64 bits are known by what term?
    8·1 answer
  • Why are digital calendars considered to be a convenient way to maintain a study schedule?
    10·2 answers
  • Which of the following are recommended techniques for protecting computer files and data? Check all of the boxes that apply.
    15·2 answers
  • What is a typical grace period for a credit card...
    15·2 answers
  • While researching ideas for cutting energy costs is his company. Hector watches an online video in which a business expert says,
    6·2 answers
  • Match the following technologies with their applications.
    9·1 answer
  • When ____ occur during preliminary debugging, dummy print statements—statements that are temporarily inserted into the code to d
    9·1 answer
  • Select which type of computer you would like to begin building, based on the needs of your new job: Frequent travel Maintaining
    7·1 answer
  • Write a program that plays a reverse guessing game with the user. The user thinks of a number between 1 and 10, and the computer
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!