Question: Several odd numbers have the property that their value squared + 2 is prime and their value squared 2 is prime. For instance, 3 ^
Several odd numbers have the property that their value squared is prime and their value squared is prime. For instance, and both of which are prime, so is such a number. Write a program to find and output all such odd numbers between and with this property. The first five numbers are There are additional numbers between and Your output should be a list of all numbers with this property. Declare any needed variables in C and then enter assembly code to initialize any variables, iterate from to and for each number, say i compute i and i and determine if both are
prime. To compute if a number is prime, iterate from up to but not including ii to see if any such value divides into ii If no divisor is found for either, then leave assembly code to output i Next, increment i by and repeat until i To determine if a number divides into another number, put the numerator in the eax, set the edx to and div by the denominator. If the edx is then there is no remainder and so the denominator divides into the numerator and the
numerator is not prime. For simplicity, use the range numerator as your divisor rather than trying to be more efficient. Remember that the only code that should appear in C are your variable declarations and your printf. Once your assembly program is working correctly, copy your output to the bottom of the c file in comments and submit the one file.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
