Answered step by step
Verified Expert Solution
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,
. 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 953Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started