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
AQ We need a pristine table or diagram. Please deliver a perfect solution quickly. On a computer, create and run a 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 factors: itself and For example, the number has factors so it is not prime. However, is a prime number, since its only factors are and Your program should store the number to check as a variable and then set a variable called isPrime to if the variable is prime, otherwise So if num is before the program runs the prestored variables will be:
num byte
isPrime byte
and after the program runs, the variables will be:
num byte
isPrime byte
This is because is prime. If the number is not prime, then set isPrime to
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
