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
How tp access to all tools in ms word
Tresset [83]
Wigga woggga wigggawiggva
8 0
3 years ago
Why is a computer called"a computer"?​
sleet_krkn [62]

Answer:

because it was originally given to humans (himan computers) who performed numerical calculations using mechanical calculators.The term was later given to mechanical devices as they began replacing human computers.

4 0
3 years ago
Read 2 more answers
a. Daily Life Magazine wants an analysis of the demographic characteristics of its readers. The marketing department has collect
kherson [118]

Answer:

uh

Explanation:

7 0
3 years ago
Why might a business choose a server-based network over a peer-to-peer network?
valina [46]

Answer:

Hope this helps you out    Answer: Greater security

Explanation:

Server maintains better relationship with server at everry time. So it gives maximum of security and reliability against unauthorised access

3 0
3 years ago
Functions of barriers include (mark all that apply): A. Define boundaries B. Design layout C. Deny access D. Delay access
gayaneshka [121]

Answer:

A. Define boundaries

C. Deny access

D. Delay access

Explanation:

A barrier is a material or structure used to prevent or block access. Barriers can either be natural or structural and are used for many purposes usually for security reasons. The following are functions of barriers either natural or structural:

  1. Define areas of boundaries
  2. Delay or slow access. Example is the use of speed bumps to slow down vehicles.
  3. Provide access to entrances such as the use of gates
  4. Deny access to unauthorized personnel and allowing authorized personnel.
4 0
3 years ago
Other questions:
  • Name the function in Python that prompts user to enter values as per the data type specified.
    5·1 answer
  • Sue needs to add a header and a footer to a presentation. Which process should she use to do this?
    10·2 answers
  • During his last performance review, Franco's boss urged him to set some short-term and long-term sales goals to help him perform
    6·2 answers
  • ____________________ is the primary code humans use to communicate. (Points : 1
    9·1 answer
  • When would you use the AutoFit to Contents option?
    15·1 answer
  • How do we Rewrite the following Python code to avoid error. mark=inpt("enter your mark ")
    6·1 answer
  • write a program that asks the user for a month number and displays the number of days that month has?
    7·2 answers
  • Which discipline focuses on the design of computer hardware?
    5·2 answers
  • The second generation of computer languages is a higher-level language than
    14·1 answer
  • The _____ layer addresses how the software will execute on specific computers and networks.
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!