Log In
0 votes
Write a program in JavaScript that accepts an integer greater than 2 and tells whether
it is a prime number. Note that JavaScript has if and while statements with the same
syntax as C and Java. The modulo operator is %. If you need the square root of x, use
Math.sqrt (x).
in Computer Networks 30 views

Please log in or register to answer this question.

Related questions

0 votes
0 answers
0 votes
0 answers
Numerous people have registered DNS names that consist of, where word is a common word. For each of the following categories, list five such Web sites and briefly summarize what it is (e.g., belongs to a gastroenterologist on Long ... of categories: animals, foods, household objects, and body parts. For the last category, please stick to body parts above the waist.
asked Mar 19, 2019 in Computer Networks ajaysoni1924 48 views
0 votes
0 answers
Imagine that someone in the math department at Stanford has just written a new document including a proof that he wants to distribute by FTP for his colleagues to review. He puts the program in the FTP directory ftp/pub/forReview/newProof.pdf. What is the URL for this program likely to be?
asked Mar 19, 2019 in Computer Networks ajaysoni1924 55 views
0 votes
0 answers
Although it was not mentioned in the text, an alternative form for a URL is to use the IP address instead of its DNS name. Use this information to explain why a DNS name cannot end with a digit.
asked Mar 19, 2019 in Computer Networks ajaysoni1924 56 views