Question: Write a javascript program that will ask user to enter two numbers. Your program will then find prime numbers between these two numbers inclusively. The

Write a javascript program that will ask user to enter two numbers. Your program will then find prime numbers between these two numbers inclusively. The output of your program would be a table which contains two columns. The first column would be those prime numbers your program found and the second column contains corresponding square of these prime numbers. For example, if use input 10 and 20, then the prime numbers between these two numbers would be 11, 13, 17, and 19. Then your program will output a table like the following. Note you only need to output at most four smallest prime numbers between these two numbers entered by the user.

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!