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
Please help me with Excel!!! A lot of points!
yaroslaw [1]

Answer:

=((SUM(PUT RANGE OF MOTHLY EXPENSES HERE)*12)+SUM(PUT RANGE OF YEARLY EXPENSES HERE))/12

Explanation:

Adds all of the Monthly Expenses : SUM(PUT RANGE OF MOTHLY EXPENSES HERE)

Multiplies the result by 12: *12

Then adds all of the Yearly Expenses to the product of Steps 1 and 2 : SUM(PUT RANGE OF YEARLY EXPENSES HERE)

Divides this new sum by 12: /12

=((SUM(PUT RANGE OF MOTHLY EXPENSES HERE)*12)+SUM(PUT RANGE OF YEARLY EXPENSES HERE)/12)

6 0
3 years ago
A slide ____ is a special effect used to progress from one slide to the next slide in a slide show.
marusya05 [52]
Transition, transition are mainly used is videos, moves, and powerpoint, they use spatial effects and are smooth with different colors, paths, or sounds. 
8 0
3 years ago
Read 2 more answers
Which of the following scenarios might indicate that you have been a victim of identity theft?A)Your credit report displays acco
victus00 [196]

Answer:

Option A is the correct answer for the above question.

Explanation:

A Victim is a person, who faces the problem of a criminal person. Here in the question, the scenario is that a user is a victim of the identity of being theft by some other person. So the user can get known by the help of option a, which suggests that the user's credit card report display something which is not done by him then it can be the scenario, where the user can understand that he is a victim. hence option a is the correct answer where the other option is not because--

  • Option B suggests the user does not pay the bill on time but it is a general case because the bill is paid by the user is in every month not a single time.
  • Option C suggests both options (A and B) are correct, but option b is not the correct.
  • Option D suggests that no option is valid from the above but option A is the correct.
7 0
3 years ago
I made a fish emoji what do you think &gt;{'_'}&lt; should I change anything
Anvisha [2.4K]

Answer: It is beautiful

Explanation:

3 0
3 years ago
Read 2 more answers
Which statement, if any, about Boolean is false?
Vladimir79 [104]

Answer:

A.

Explanation:

7 0
3 years ago
Other questions:
  • What is the purpose of lookup tables in spreadsheet software
    13·2 answers
  • Which wireless technology has a typical transfer rate of 1 Mbps to 3 Mbps at distances up to about 10 meters?
    7·1 answer
  • Slicing can best be described as
    9·1 answer
  • In Outlook 2016, what are the three format options when sending an email message? Check all that apply.
    7·1 answer
  • How can i become an ailen?
    5·2 answers
  • To change the name of a field, press and hold or right-click the column heading for the field, tap or click ____ on the shortcut
    7·1 answer
  • What is the importance of effectiveness in communication?
    14·1 answer
  • Assume the user responds with a 3 for the first number and a 4 for the second number.
    13·1 answer
  • What might a designer need to consider when choosing an appropriate energy source for products and power systems
    15·1 answer
  • imagine that you wanted to write a program that asks the user to enter in 5 grade values. the user may or may not enter valid gr
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!