Computers and Technology

3.Writeprogram codesusing forloop of the followingquestions. The code should be written incomplete JavaScript format. Show thedry run. a)Accept a number from the user, check if the number is a prime number and display an appropriate message. For example, if the user inputs 7, then display the message, “7 is a prime number”, otherwise if the user inputs 8, then display the message, “8 is not a prime number”.(Prime numberis a number whose only factors are1 and the number itself.)b)Display the factorialand the first fivemultiples of 5usinga singlefor loop.(Factorial is the product of an integer and all thepositiveintegers lesser thanit. Eg. 5!=1*2*3*4*5=120)

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 00:20, kcameronanderso
What’s resistance in an electrical circuit ?
Answers: 1
image
Computers and Technology, 23.06.2019 13:00, jaelynnm
Donnie does not have powerpoint. which method would be best for elana to save and share her presentation as is? a pdf a doc an rtf a ppt
Answers: 3
image
Computers and Technology, 24.06.2019 08:00, nataliamontirl4230
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
image
Computers and Technology, 24.06.2019 19:00, taridunkley724
Which of the following "invisible" marks represents an inserted tab?
Answers: 1
Do you know the correct answer?
3.Writeprogram codesusing forloop of the followingquestions. The code should be written incomplete J...

Questions in other subjects:

Konu
Mathematics, 20.05.2021 19:20