Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

a. Use nested for loops to find all the three-digit Armstrong numbers. Armstrong numbers are three digit numbers such that the sum of the digits cubed is equal to the number itself. For example, 153 is an Armstrong number because    13 + 53 + 33 = 153 However, 294 is not, because 23 + 93 + 43= 801 (not 294) b. Use nested for loops to find four positive integers whose sum is 45, and such that the first plus 2, the second minus 2, the third multiplied by 2, and the fourth divided by 2 are all equal. Please note that these four numbers are integers, and not necessarily just digits. In this problem, we are no longer finding a single four-digit number; we are finding four separate numbers. However, since we are trying to generate all possible combinations, the procedure should be the same. For those of you having trouble with the English on this one (I've noticed that students really don't like word problems), here's what that means. 

• The output of your program should be four numbers. They won't be negative numbers. • When you add the four numbers, they add up to 45. • If you add 2 to the first number, you get the same answer as if you had subtracted 2 from the second number. • If you multiply the third number by two, you also get the same answer. • If you divide the fourth number by two, you also get the same answer. 

The following mathematical statments are also true about these numbers: A+2=B-2=Cx2=D+2 and A+ B+C+ D= 45 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91536528
  • Price:- $30

Guranteed 24 Hours Delivery, In Price:- $30

Have any Question?


Related Questions in Computer Engineering

Serial port assignmentdesign write and debug an mc8051

Serial Port Assignment Design, write, and debug an MC8051 assembly program which does the following: Configure the serial port to mode 1 with enabled reception and 9600 BAUD rate for the DS89S420 microcontroller. Also co ...

From a security standpoint do you believe the apple

From a security standpoint, do you believe the Apple approach of hiding permissions or the Android approach of requiring the user to accept application permissions is a better approach? Why do you feel this way and do yo ...

Two manufacturing firms are located on the banks of the

Two manufacturing firms are located on the banks of the Crimea River. Riditna Paper withdraws river water for use in its paper mill, and returns it, along with waste effluent, back into the river. (Effluent is a co-produ ...

Would you help me by giving me some helpful tips about how

Would you help me by giving me some helpful tips about how to study basic C programming in days?

A student finds that 2496g of water at 249 ordmc density

A student finds that 24.96g of water at 24.9 ºC (density= 0.9971 g/cm3 ) is required to completely fill an empty flask. The water is removed and completely dried; granular solid copper weighing 51.24g is then added to th ...

What are the differences between the federal deficit and

What are the differences between the Federal deficit and Federal Debt? How does a government budget deficit affect the economy, specifically the unemployment rate and job creation? Identify two periods in recent history ...

Question suppose that an application has m input variables

Question : Suppose that an application has M input variables and that each variable partitions the input space into N equivalence classes. The multidimensional partitioning approach will divide the input domain into how ...

A simple substitution cipher can be created by shifting a

A simple substitution cipher can be created by shifting a letter n positions in alphabetic order. For example, if the possible characters are the list [A...Za...z], a shift of three would translate A to D and Z to c. The ...

When we look at the ease to enter the different market

When we look at the ease to enter the different market structure, there is no doubt that 'monopoly' is the hardest. Why? -- There is only ONE firm that has established 'economies of scale' with the production of their go ...

Scenario you have been asked to setup a lvm volume for the

Scenario: You have been asked to setup a LVM volume for the Sales group. Your task is to use /dev/sdb to create a logical volume named sales_lvm, format it with XFS, and mount under /sales. Make sure the sales group owns ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As