Pseudo code for recursive function to print prime numbers

Assignment Help Programming Languages
Reference no: EM1396683

Write in pseudo code the recursive function which receive 2 integers (a and b) and returns sum of all common prime dividers (1 is not prime). For example:

a = 48, b = 60
48=2*2*2*2*3
60=2*2*3*5
The function returns 7=2+2+3

If we write all the natural numbers below 10 which are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Determine the sum of all multiples of 3 or 5 below 1000. What is the right answer?

Reference no: EM1396683

Questions Cloud

Analysis of the hold up problem : What does the analysis of the 'hold up' problem contribute to the explanation of the size and scope of firms?
Normally distributed population with a mean : Assume that a population is normally distributed with a mean of 100 and a standard deviation of 15. Would it be unusual for the mean of a sample of 3 to be 115 or more? Why or why not?
List properties of those materials that made them suitable : Identify two materials (biomaterials) used in the development of bioengineered products (for example, polycaprolactone, collagen).
Prediction of sat by regression approch : The correlation between IQ and the verbal SAT score among the seniors at GWB High School is .90; it is significant. The mean IQ is 100 with a standard deviation of 10.
Pseudo code for recursive function to print prime numbers : Write in pseudo code the recursive function which receive 2 integers (a and b) and returns sum of all common prime dividers (1 is not prime).
Determine the solubility of the amino acids : Butanol:Water:Glacial Acetic Acid (65:20:15) was used as TLC solvent, where the stationary phase was silica. The TLC was done for identification of amino acids.
Use of sensitivity analysis and postoptimality analysis : Describe the use of sensitivity analysis and postoptimality analysis in analyzing the results. Describe the characteristics of a Bernoulli process. How is a Bernoulli process associated with the binomial distribution?
Constructing a probability tree : An accounting firm has recently recruited six graduates: three men and three women. Three of the graduates are to be selected at random to work in the firms suburban office. Construct a probability tree.
Hypotheses for the role of rna silencing : In what two different ways do bacteria "sense" the amount of trp in the environment? Describe both mechanisms in detail. What are two hypotheses for the role of RNA silencing.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program to calculate integer part of quotient

Write program segments that accomplish each of the following tasks:Calculate the integer part of the quotient when integer a is divided by integer. Calculate the integer remainder when integer a is divided by integer b.

  Design architecture of system to accept natural language

Using the generic model of a language processing system presented here, design the architecture of a system that accepts natural language commands and translates.

  One-dimensional as array of counters to solve problem

Write program which determines how many salespeople earned salaries in each of following ranges. Use the one-dimensional as the array of counters in solving this problem

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Program to inputs four numbers and graphs them as pie chart

Write down a program which inputs four numbers and graphs them as pie chart.

  Write function to merge contents of two sorted arrays

Write a function which will merge contents of two sorted (ascending order) arrays of type FLOAT values, use efficient bubble sort to sort two arrays first and then use merger function.

  Write the program to model simple calculator

Write the program to model the simple calculator. Each data line must consist of next operation to be performed from list below and right operand.

  Program to display number of times name appears in file

You have read all names from the file, display number of times this name appears in file. write logic - step by step - to show code program to accomplish this task.

  Parking garage program to permit user to enter type of car

Parking garage program to permit user to enter type of car in addition to number of hours in parking garage. Program can be use for any number of customers.

  Write class which accepts user-s hourly rate of pay

Write down class which accepts the user's hourly rate of pay and number of hours worked. Display user's gross pay, withholding tax (15% of gross pay).

  Program to calculate amount person would earn over a period

Write a program that calculates the amount a person would earn over a period of time if his or her salary is one penny the first day.

  How to update web pages using navy for unvisited link

The Marketing Director at Steel Solutions is unhappy that links on company Web page appear in blue. She has asked you to update Web pages to use navy for unvisited link.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd