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
If you are referencing cell (C2)in Excel and want to be able to copy the formula and keep using the data in cell C2 in every pla
sergiy2304 [10]

If you are referencing cell (C2)in Excel and want to be able to copy the formula and keep using the data in cell C2 in every place you copy it to, the way to reference the cell? is known to be $C$2.

<h3>What is a cell reference in Excel?</h3>

A cell reference is known to be called a cell address and this is seen as a make up of a column letter and also those of  row number that tells a cell on a worksheet.

Hence, If you are referencing cell (C2)in Excel and want to be able to copy the formula and keep using the data in cell C2 in every place you copy it to, the way to reference the cell? is known to be $C$2.

Learn more about cell referencing from

brainly.com/question/19035038

#SPJ1

8 0
2 years ago
What is the promotion and advertising stage of a product or service called?
Eddi Din [679]

Answer:

Marketing

Explanation:

8 0
3 years ago
How do films use camera shots?
lorasvet [3.4K]
These advanced camera shots, or angles, are used in film to convey an effect or emotion rather than exemplify a sense of space. Before filming, cinematographers will write out their shot list in order to plan how each scene of their film should be shot
7 0
2 years ago
Read 2 more answers
________ are devices in a computer that are in either the on or off state
Vanyuwa [196]
The appropriate response is Electrical Switches. These are electromechanical gadgets that are utilized as a part of electrical circuits to control, recognize when frameworks are outside their working reaches, flag controllers of the whereabouts of machine individuals and work pieces, give a way to manual control of machine and process capacities, control lighting, et cetera.
6 0
3 years ago
The internet has provided great opportunities for fundraising. true/false
alekssr [168]
True, sites such as kickstarter and just giving are fantastic examples of such.
8 0
3 years ago
Other questions:
  • There are several vehicles in a parking lot. Some of them are motorcycles
    8·2 answers
  • Juliet is trying to increase her savings account and she decides that she is going save an additional $700 every month. If her m
    9·1 answer
  • vulnerability is a feebleness which allows an attacker to condense a system's information assurance to security,is it true or fa
    14·1 answer
  • IT investments can lead to developing IT capabilities and dynamic IT competencies, which can lead to achieving the following six
    5·1 answer
  • When a business is using methods that help it use its time and resources the best they can, what are they exercising?
    11·2 answers
  • Define<br>output<br>devices<br>.<br>Give<br>any<br>three<br>examples<br>.<br>3.​
    8·2 answers
  • Does anyone know a good reason WHY to change your username.
    5·1 answer
  • A customer is looking for a storage archival solution for 1,000 TB of data. The customer requires that the solution be durable a
    9·1 answer
  • Types of computer viruses<br>​
    5·2 answers
  • When you add encryption to a powerpoint presentation what does it do
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!