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
Nezavi [6.7K]
4 years ago
9

Two non-negative integers x and y are equal if either: Both are 0, or x-1 and y-1 are equal Write a boolean-method named equals

that recursively determines whether its two int parameters are equal and returns true if they are and false otherwise.
Computers and Technology
1 answer:
crimeas [40]4 years ago
3 0

Answer:

Following are the code which is mention below.

bool equals (int x, int y)  // method equals

{

if( (x<0) || (y<0) )  // check number if it is less then 0

return false;  // return false

if( (x==0) && (y==0) )  // check condition if number is equal to 0

return true;  // return true

return equals(x-1, y-1);  

}

Explanation:

  • Here we declared a function "equals" of type bool which means it either return "true" or "false".
  • Inside the function equals we check the condition which are mention above

                   1.   if x and y both are less then  0 then it returns "false".

                   2.  if x and y both are equal to 0 then it returns "true"

                   3.   Otherwise it return x-1 and y-1.

You might be interested in
How long does it take to get your alignment fixed?
GarryVolchara [31]
This isn't a computer-related question...

But, lucky for you, I took some automotive in high school. Usually, it depends on equipment used and how many clients they have. Usually, it is done within an hour. 
8 0
3 years ago
The Fully Meets rating should be assigned when the spelling suggestion matches query intent
neonofarm [45]
Yes definitely absolutely
8 0
3 years ago
The transport layer protocol used by the tcp / ip suite that does not provide guarantees on ordering or confirmation of receipt
VARVARA [1.3K]
UDP = connectionless vs. TCP is connection oriented.
4 0
4 years ago
Click this link to view O NET'S Wages and Employment section for Film and Video Editors.
soldier1979 [14.2K]

Answer: much faster than average (11% or higher)

Explanation:

7 0
3 years ago
Read 2 more answers
How do you make a ringtone on earsketch
RoseWind [281]

Haven't used earsketch, but here we go.

Answer:

1). Make a track in earsketch, make it like 6/7 seconds

2.) export your track as an .mp3, .wav, or  .ogg (your choice!)

3.) (If on android) Navigate to settings, now search for an entry for ringtone.

4.) If you have no luck, look up how to set ringtone on your desired phone brand (iOS, Android, etc.)

5.) Test out your new ringtone

6.)Profit

4 0
3 years ago
Other questions:
  • For Adults/Adolescents, you should call/activate EMS: Before providing CPR. After providing CPR for 2 minutes. After an AED has
    13·1 answer
  • In 1–2 sentences describe how you would insert a row in a spreadsheet.
    6·2 answers
  • What is life all about?
    15·2 answers
  • What is the term used for the document that describes the scenes and sequence of a game?
    6·1 answer
  • Which part of a formal email is optional
    6·2 answers
  • What is a telecomunications system? 1) A system that enables the transmission of data over public or private networks. 2) A comm
    11·1 answer
  • WILL GIVE BRAINLIEST!!
    12·1 answer
  • Websites whose URL’s contain tildes (~) are usually published by the government. TRUE or FALSE.
    8·2 answers
  • Which of the following is not a type of Internet Job Board? Options Resume Blaster Professional Association Target Applicants We
    8·1 answer
  • Super Scores
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!