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
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