Question: AQ 1 7 We need a pristine table or diagram. Please deliver a perfect solution quickly. On a computer, create and run a 6

AQ17 We need a pristine table or diagram. Please deliver a perfect solution quickly. "On a computer, create and run a 6800 program which computes the problem allocated to at the end of this document. When you have tested and run your program please demonstrate to your tutor.
Question A
Write a program to determine if a number is prime. A prime number only has 2 factors: itself and 1. For example, the number 12 has 6 factors (1,2,3,4,6,12) so it is not prime. However, 3 is a prime number, since its only factors are 3 and 1. Your program should store the number to check as a variable and then set a variable called isPrime to 1 if the variable is prime, otherwise 0. So if num is 3, before the program runs the pre-stored variables will be:
num .byte 3
isPrime .byte 0
and after the program runs, the variables will be:
num .byte 3
isPrime .byte 1
This is because 3 is prime. If the number is not prime, then set isPrime to 0."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!