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]
1 year ago
14

3.34 LAB: Mad Lib - loops in C++

Computers and Technology
1 answer:
Ganezh [65]1 year 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
Java uses interfaces to provide the benefits of multiple inheritance. A superclass object is a subclass object. A subclass is of
WITCHER [35]

COMPLETE QUESTION

Which of the following is false?

a. A subclass is often larger than its super class.

b. A super class is object is a subclass object.

c. The class following the extends keyword in a class declaration is that direct super class of the class being declared.

d. Java uses interfaces to provide the benefits of multiple inheritance

Answer:

B) A super class is object is a subclass object.

Explanation:

In object oriented programming, the concept of inheritance is greatly utilized, this refers to deriving a class from another class. The derived class is the sub-class and it is derived from its super class, as a matter of fact in Java programming language, all classes are derived from some other class. Objects are made from classes with their state (fields) and behavior (methods) since objects are made from classes, the objects of the super class will not be the same as that of the subclass.

4 0
1 year ago
Which type of utp cable is used to connect a pc to a switch port?
rodikova [14]
HDMI Cable, i think that's what it's called.
3 0
2 years ago
Consider the following relation:CAR_SALE(Car#, Date_sold, Salesperson#, Commission%, Discount_amt)Assume that a car may be sold
GalinKa [24]

Answer:

The answer to this question can be given as:

Normalization:

Normalization usually includes the division of a table into two or more tables as well as defining a relation between the table. It is also used to check the quality of the database design. In the normalization, we use three-level that are 1NF, 2NF, 3NF.

First Normal Form (1NF):

In the 1NF each table contains unique data. for example employee id.  

Second Normal Form (2NF):

In the 2NF form, every field in a table that is not a determiner of another field's contents must itself be a component of the table's other fields.

Third Normal Form (3NF):

In the 3NF form, no duplication of information is allowed.

Explanation:

The explanation of the question can be given as:

  • Since all attribute values are single atomic, the given relation CAR_SALE is in 1NF.  
  • Salesperson# → commission% …Given  Thus, it is not completely dependent on the primary key {Car#, Salesperson#}. Hence, it is not in 2 NF.                                                                                                        

The 2 NF decomposition:

        CAR_SALE_1(Car#, Salesperson#, Date_sold, Discount_amt)

         CAR_SALE_2(Salesperson#, Commission%)

  • The relationship in question is not in 3NF because the nature of a transitive dependence occurs
  • Discount_amt → Date_sold → (Car#, Salesperson#) . Thus, Date_sold is neither the key itself nor the Discount amt sub-set is a prime attribute.  

The 3 NF decomposition :

        CAR_SALES_1A(Car#, Salesperson#, Date_sold)

        CAR_SALES_1B(Date_sold, Discount_amt)

        CAR_SALE_3(Salesperson#, Commission%)

5 0
1 year ago
Type the correct answer in the box. Spell all words correctly.
marysya [2.9K]

Answer:

A Standard Lens

Explanation:

Since David wants to take pictures of people around him and also the objects far away, a standard lens would be fit for that.

3 0
1 year ago
The following code should take a number as input, multiply it by 8, and print the result. In line 2 of the code below, the * sym
Juli2301 [7.4K]

Answer:

num = int(input("enter a number:"))

print(num * 8)

Explanation:

num is just a variable could be named anything you want.

if code was like this num = input("enter a number:")

and do a print(num * 8)

we get an error because whatever the user puts in input comes out a string.

we cast int() around our input() function to convert from string to integer.

therefore: num = int(input("enter a number:"))

will allow us to do  print(num * 8)

6 0
2 years ago
Other questions:
  • Mr. Cooper would like to customize his Excel software so his students can create an electronic graph in Excel for their lab repo
    6·1 answer
  • Open this link after reading about Ana's situation. Complete each sentence using the drop-downs. Ana would need a minimum of ato
    5·2 answers
  • Classify the given items as belonging to the public domain or protected by copyright law.
    6·2 answers
  • #A year is considered a leap year if it abides by the #following rules: # # - Every 4th year IS a leap year, EXCEPT... # - Every
    5·1 answer
  • Write a program that computes and prints the average of the numbers in a text file. You should make use of two higher-order func
    9·1 answer
  • Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of s
    8·1 answer
  • 14. Emelia is very concerned about safety and has conducted a study to determine how many bike helmets were replaced at each loc
    13·2 answers
  • Write a function that implements another stack function, peek. Peek returns the value of the first element on the stack without
    11·1 answer
  • Which of the following are true statements about the data that can be represented using binary sequences?
    5·1 answer
  • The dealer's cost of a car is 85% of the listed price. The dealer would accept any offer that is at least $500 over the dealer's
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!