Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is problem meant to be done in C programming, libraries limited to stdlib.h, stdio.h, and math.h, . Problem: For each integer in a data

This is problem meant to be done in C programming, libraries limited to stdlib.h, stdio.h, and math.h,

image text in transcribed

. Problem: For each integer in a data set (described below the following transformation will be completed, first we will select a special digit within each number, if the number is even then the digit found in the ones place will serve as the special digit, if the number is odd then the digit found at the highest power of ten will serve as the special digit The special digit is used to change each digit in an integer found in the data set, from all even digits subtract the special digit and to all odd digits add the special digit . The resulting sum or difference will not exceed 9 or be negative but rather the result will wrap around such that 9 plus 1 is zero and Ominus 1 is 9. Example Number: 20791 Example Number: 53648 Special digit: 2 as the number is odd. Special digit: 8 as the number is even 2-2 (subtract from even digits) - 0 5+8-3 0-28 3 + 8-1 7 + 2 (add to even digits) - 9 6-8-8 9+2 -1 4-8-6 1 + 2-3 8-8-0 New digits retain the same power of 10 as the original digit New digits retain the same power of 10 as the original creating a final value of 08913 which would display as 8913 digit creating a final value of 31840, The only input for this problem is a single integer that will serve as both the seed for the random number generator and as the largest possible value in the data set (the smallest value to generato is one). The seed value must be validated to be greater than zero. A total of 20 integers will be generated, transformed, sorted, and printed as seen in the example executions, Example Execution #1: Data Set From Example Execution #1 BEFORE Enter nood value -> 1000 transformation and sorting, this is for your reference and is not a part of the expected output: Index [00 - 04: 26 39 41 41 56 Index | 00 - 04 | 1 11 11 80 514 319 605 Index 105 091: 70 210 240 320 410 Index 105 - 091 142 804 571 269 856 THloy (10 141 : 460 468 622 780 040 Index 110 - 1411 139 284 995 108 434 Index 15 - 19:842 884 950 960 990 Index 115 - 191: 554 217 501 692 953 . Problem: For each integer in a data set (described below the following transformation will be completed, first we will select a special digit within each number, if the number is even then the digit found in the ones place will serve as the special digit, if the number is odd then the digit found at the highest power of ten will serve as the special digit The special digit is used to change each digit in an integer found in the data set, from all even digits subtract the special digit and to all odd digits add the special digit . The resulting sum or difference will not exceed 9 or be negative but rather the result will wrap around such that 9 plus 1 is zero and Ominus 1 is 9. Example Number: 20791 Example Number: 53648 Special digit: 2 as the number is odd. Special digit: 8 as the number is even 2-2 (subtract from even digits) - 0 5+8-3 0-28 3 + 8-1 7 + 2 (add to even digits) - 9 6-8-8 9+2 -1 4-8-6 1 + 2-3 8-8-0 New digits retain the same power of 10 as the original digit New digits retain the same power of 10 as the original creating a final value of 08913 which would display as 8913 digit creating a final value of 31840, The only input for this problem is a single integer that will serve as both the seed for the random number generator and as the largest possible value in the data set (the smallest value to generato is one). The seed value must be validated to be greater than zero. A total of 20 integers will be generated, transformed, sorted, and printed as seen in the example executions, Example Execution #1: Data Set From Example Execution #1 BEFORE Enter nood value -> 1000 transformation and sorting, this is for your reference and is not a part of the expected output: Index [00 - 04: 26 39 41 41 56 Index | 00 - 04 | 1 11 11 80 514 319 605 Index 105 091: 70 210 240 320 410 Index 105 - 091 142 804 571 269 856 THloy (10 141 : 460 468 622 780 040 Index 110 - 1411 139 284 995 108 434 Index 15 - 19:842 884 950 960 990 Index 115 - 191: 554 217 501 692 953

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

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

ISBN: 0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

What is job enlargement ?

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago

Question

What is the hallmark clinical feature of a molar pregnancy?

Answered: 1 week ago

Question

What is the relationship between humans and nature?

Answered: 1 week ago