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
Scorpion4ik [409]
3 years ago
7

Give the difference betewen recursion and interation in C. Sight what are the advantages and their disadvantages?

Computers and Technology
1 answer:
mrs_skeptik [129]3 years ago
8 0
I believe you mean iteration. Recursion is when you have a function that calls or uses it's self. it's advantageous because it reduces the amount of code but can fall victim to an endless loop. Iteration is using a while loop or any kind of loop to iterate through a data set normally an array, iteration allows you to do an action for every iterated item but a downside is that it takes a long time to iterate and it is not efficient
You might be interested in
Nicotine us a dangerous chemical found in Cigarettes; it is accompanied by two other very harmful chemicals. These are
NNADVOKAT [17]

Answer: Carbon Monoxide and Tar.

4 0
3 years ago
Most of the pollution in the ocean comes from:
pashok25 [27]
80% of the Pollution to the Marine Enviroment comes from Land. 
4 0
3 years ago
Write a short program using Python that will:
Alexxx [7]

Answer:

// program in Python to check perfect number

#function to find number is perfect or not

def is_Perfect_Number(n):

   #total variable

   tot = 1

   i = 2

   #sum of all divisor of number

   while i*i<=n:

       if n%i==0:

           tot = tot + i + n/i

       if tot == n and n != 1:

           return 1

       i = i+1  

   return 0

#read until user enter a perfect number

while True:

   #read integer

   num = int(input("Input an integer: "))

   #call the function

   if(is_Perfect_Number(num)):

       print(num,"is perfect number")

       #if perfect number break

       break

   else:

       print(num,"is not a perfect number")

       #ask again

   print("try again.")

Explanation:

Read number from user and then call the function is_Perfect_Number() with  parameter "num".This will find the sum of all divisor of number.If sum is  equal to number then it will return 1 else return 0.If the number is not  perfect then it will again ask to enter a number until user enter a perfect  number.

Output:

Input an integer: 24

24 is not a perfect number                                                                                                

try again.                                                                                                                

Input an integer: 28                                                                                                      

28 is perfect number

6 0
3 years ago
A list of the slides in a presentation is found here.
Hoochie [10]
 Formatting toolbar because if you look to the right there is the slides and at the top it says: Formatting toolbar
8 0
3 years ago
Read 2 more answers
Have you ever been told sensitive or confidential information that made you uncomfortable? How did you deal with the situation?
Korvikt [17]
I would tell said individual to stop what they’re trying to tell me because if it’s not stuff I should know about or want to hear about then I don’t wanna hear any of it
7 0
3 years ago
Other questions:
  • The spreadsheet below shows the age, grade level, major, and minor of four students in college. A purple background in the Major
    7·1 answer
  • Which of the following terms are aspect ratios for devices? 'select all that apply
    11·1 answer
  • Suppose barriers to entry exist in the telecommunications industry. This best describes a _____ market.
    12·1 answer
  • Prepare a risk assessment report (RAR) with information on the threats, vulnerabilities, likelihood of exploitation of security
    14·1 answer
  • Which DHCPv4 message will a client send to accept an IPv4 address that is offered by a DHCP server? (Points : 5) Unicast DHCPACK
    8·1 answer
  • You want to make sure that a set of servers only accepts traffic for specific network services. You have verified that the serve
    7·1 answer
  • What is the first things u do upon seeing this sheet?​
    14·2 answers
  • A merchant bank and a merchant have been involved in a Web-based electronic transaction. Which of the following mediates between
    9·1 answer
  • Describe accessibility in Windows 7 ​
    13·1 answer
  • HOW TO GET RID OF THESE LINES?? PLS WILL GIVE BRAINLIEST
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!