Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 b please Mailings Review View 1.a)If our progra of ABCDE, what equation would be needed to use the individual digit values to create the

1 b please image text in transcribed
image text in transcribed
Mailings Review View 1.a)If our progra of ABCDE, what equation would be needed to use the individual digit values to create the five-digit number? As a simpler example to think about, if we had digit/(a value from 0 to 9) and digit K what equation would we have to write to find the value of the two-digit number JK? Write the corresponding equation for using digits A, B, C, D, and E to get the five-digit number ABCDE m has the integer variables A, B, C, D, and E to use to find the digits of our value 4 points) A(1044)+B(10431 C(1042)+D 10+E 1.b] Write a pseudocode algorithm to test all possible combinations of values for A, B, C, D, and to find a S-digit value that makes the puzzle true. In your algorithm use the variable names givern below and follow all the requirements listed: integer variables A, B, C, D, and E for the five digits of ABCDE int oneBefore to hold the value of ABCDE with an extra numeral 1 at the beginning iat oneAfter to hold the value of ABCDE with numeral 1 at the end of the number Requirement: For this question your code MUST iterate over all the possible values for each digit using a different loop for each digit Requirement: You may NOT declare a single variable to hold or test ABCDE as a single five digit Rubric: (17 points) looping for individual digits-5 points) (Correct calculation of oneBefore-2 points) (Correct calculation of oneafter-2 points) (Correct test to determine if current five digit value solves the puzzle -3 pts) Uncludes a process for saving individual digit values for valid puzzle solution - 3 pts) 5 7 8 0 Answer 1 of 1 Done We can make an equation: 3(100000 x) 10x+1 (Why? Well, adding 100000 puts a 1 at the front of a five-digit number, and multiplying by 10 and adding 1 puts a 1 at the end of a number) Solving this gives: 10x+1 3(100000 x) 10x+1 300000 + 3x 10x -299999 +3x 7x- 299999 x = 29999917 42857 The answer is 42857 (142857 is three times smaller than 428571)

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 3 Lnai 8726

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448440, 978-3662448441

More Books

Students also viewed these Databases questions

Question

The role of life: It consists of your own service to yourself.

Answered: 1 week ago

Question

a. How do you think these stereotypes developed?

Answered: 1 week ago

Question

7. Describe phases of multicultural identity development.

Answered: 1 week ago