Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This question will test the basic ability to use expressions, conditionals, and loops in solving a simple (but manually intensive) problem. Write a program that

This question will test the basic ability to use expressions, conditionals, and loops in solving a simple (but manually intensive) problem.

Write a program that reads in two numbers and outputs the sum of all the factors that are in both numbers.

For example, the integer 24 has the factors 1,2,3,4,6,8,12,24 and the integer 30 has the factors 1,2,3,5,6,10,15,30. So, 24 and 30 have the factors 1,2,3,6 in common and the sum is then 1+2+3+6=12.

Hence if the input were 24 and 30 then the output would be 12.

Question: What is the common factor sum with input 21231210 and 39916800?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

Students also viewed these Databases questions

Question

Under what circumstances is polygraph testing of employees legal?

Answered: 1 week ago

Question

Briefly explain the various types of leadership ?

Answered: 1 week ago

Question

Explain the need for and importance of co-ordination?

Answered: 1 week ago

Question

Explain the contribution of Peter F. Drucker to Management .

Answered: 1 week ago

Question

What is meant by organisational theory ?

Answered: 1 week ago

Question

2. Identify issues/causes for the apparent conflict.

Answered: 1 week ago