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
Lerok [7]
3 years ago
15

Can you right the C++ of this algorithm? Inizio = Start, Fine= End. THANK YOU SO MUCH!!

Computers and Technology
1 answer:
posledela3 years ago
4 0
<span>#include <iostream> using namespace std; bool bears(int n); int main(){ int number; do{ cout<<"enter the amount of bears (press 0 to stop the program): "; cin>>number; if (bears(number)){ cout<<"you have reached the goal!"<<endl; } else{ cout<<"sorry, you have not reached the goal."<<endl; } }while(number != 0); } bool bears(int n){ if (n < 42){ return false; } else if (n == 42){ return true; } else{ if (n % 5 == 0){ return bears(n - 42); } else if(n % 2 == 0){ return bears(n / 2); } else if(n % 4 == 0|| n % 3 == 0) { int one; int two; one=n%10; two=(n%100)/10; return bears(n - one * two); } } <span>}</span></span>
You might be interested in
According to the text, the three IT trends that are having the greatest impact on the IT environment are:
maksim [4K]

Answer:

B. GRID COMPUTING , ON - DEMAND COMPUTING AND REAL TIME COMPUTING

Explanation:

Grid computing, on-demand computing and real time computing are currently the most impactful information technology processes. The Grid computing from example entails distributed computing whereby computing resources are distributed across different systems for a computing task. This is seen in server systems where a super virtual computer composed of a network of computers are connected to share resources and perform large tasks. This form of computing has majorly affected and improved complex computing tasks today.

On demand and real time computing are also other notable trends in IT with real time computing bringing the power of live and direct coverage of information to our screens and on demand making it possible for the average user to access computing resources as needed such as in the services of cloud computing providers

4 0
3 years ago
1. Explain the distinction between interpretation and compilation. What are the comparative advantages and disadvantages of the
serious [3.7K]

Answer:

11: Compiler translates a high level source program into a target equivalent (machine language).

An interpreter implements a virtual machine, the high-level programming language of which is the "machine language." The interpreter reads statements more or less one at a time in that language, and executes them as they go along.

12: One could also consider Java either. A compiler (complicated translator) can create code, which is then executed by a complicated virtual machine (interpreter)

13: A preprocessor is an initial translator which removes comments and white space, and group characters together into tokens such as keywords, identifiers, numbers, and symbols, as well as simple syntactic structure analyses. A compiler uses in-depth analysis and nontrivial transformation.

14: C++ implementations based on the early AT&T compiler created an intermediate program in C rather than assembly language

15: Stack-based language, similar to modern Java compiler byte code

16: A method in which a simple interpreter implementation evolves into building more complex versions until the compiler is built.

17: A compiler which translates byte code into machine language immediately prior to each program execution.

18: Lisp and Prolog

19: TEX and TROFF are one of such compilers that translate high-level document descriptions into laser printer or phototypesetter commands. Query language processors for database systems are also compilers that translate languages such as SQL into primitive file operations.

21: without havin to call multiple tools with command-line tools, You can write an entire program in an IDE.

8 0
3 years ago
A single inheritance model means: * A) A class can only have one parent class (superclass) B) A class can only have one child cl
Troyanec [42]

Answer:

The answer is A)

Explanation:

In programming languages like java you can only use single inhertance meaning a class can only inherit attributes from one class. But in other languanges like C you can have multiple inhertance

6 0
3 years ago
Consider the three major Vs as Volume, Velocity and Variety along with other Big Data contexts. Match the terms with the short s
12345 [234]

Answer:

See explaination

Explanation:

(MapReduce) = Programming Model

(Variability) = Sentiment analysis

(Feedback Loop Processing) = Health Systems transit

(volume, velocity, variety) = Big Data, applied to collect data

(Hadoop) = A Big Data Application that handles very large-sized block of data.

5 0
3 years ago
How will you apply the different wiring devices according to its main purposes and functions?
Gekata [30.6K]

Answer:Wiring devices are current-carrying electrical or electronic products that serve primarily as a connection or control point for electrical circuits within a range of 0–400 amperes, 0–600 volts (AC and DC), and AC/DC (660 watts, 1,000 volts AC fluorescent) as well as certain non-current-carrying wiring devices and supplies.

Wiring devices include:

Convenience plugs and power outlets (plugs and receptacles)

Connector bodies and flanged outlets

Cover plates

General-use switches and dimmers

Lampholders (incandescent, fluorescent, cold cathode, neon, quartz lamps, and others)

Lighting control devices

Motion sensing and timer switches

Receptacles

Switch, outlet, FM/TV, blank, and telephone plates

Undercarpet premise wiring systems

Products include receptacle-type arc-fault circuit interrupters (AFCIs), protection devices that can detect an unintended electrical arc and disconnect the power before the arc starts a fire. AFCI technology in residential and commercial buildings is an important electrical safety device.

8 0
3 years ago
Other questions:
  • Up to 10 people is a good guideline for the size of your study group.
    15·1 answer
  • _________ is critical to Amazon's success.<br><br> SCM<br><br> JIT<br><br> ERP<br><br> VMI
    9·1 answer
  • A _____ is the useful part of a transmission through a network.
    15·1 answer
  • Which of the following actions is an example of "window dressing?" a. Using some of the firm’s cash to reduce long-term debt. b.
    13·1 answer
  • Oxnard Casualty wants to ensure that their e-mail server has 99.98 percent reliability. They will use several independent server
    14·1 answer
  • What is a text designed for editing and authoring code is<br> A code editor <br> B
    9·1 answer
  • Word processing software, spreadsheet software, database software, and presentation software are examples of what category of co
    13·1 answer
  • Guys im getting the ps5 tomorrow :)​
    5·2 answers
  • You are a developer for a news, entertainment, lifestyle, and fashion website. User traffic has steadily increased month-over-mo
    11·1 answer
  • What is the extension of a Microsoft access database 2013​
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!