1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dlinn [17]
3 years ago
14

Does anybody know the answer to 5.7.5: Factorial of Code HS? I can’t figure it out

Computers and Technology
2 answers:
shutvik [7]3 years ago
4 0

function myFunction(num){

 n = 0;

 total = 1;

 while (n < num){

   total *= (num - n);

   n+=1;

 }

 return total;

}

alert(myFunction(6));

I'm not too proficient in JavaScript but here's what the function would look like. I hope this helps!

spin [16.1K]3 years ago
3 0

Answer:

the answer is

var N = readInt("Enter a starting value for the factorial: ");

var total = 1;

function start(){

 

for(var i = 0; i < N; i++) {

total = total * (N - i);

}

println(N + "! = " + total);

}

Explanation:

You might be interested in
Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two
svlad2 [7]

Answer:

The program in Python is as follows:

currentPrice = int(input("Current: "))

lastMonth = int(input("Last Month: "))

print("The house is $",currentPrice)

print("The change is $",(currentPrice-lastMonth),"since last month")

print("The estimated monthly mortgage is $",(currentPrice * 0.051) / 12)

Explanation:

Get input for current price

currentPrice = int(input("Current: "))

Get input for last month price

lastMonth = int(input("Last Month: "))

Print current price

print("The house is $",currentPrice)

Print change since last month

print("The change is $",(currentPrice-lastMonth),"since last month")

Print mortgage

print("The estimated monthly mortgage is $",(currentPrice * 0.051) / 12)

6 0
3 years ago
. A search engine is a way to
Sindrei [870]
<span>Option A, the search engine is the way to get information on the internet through a web browser, installed on an operating system of a computer. It is software that gathers all the information and stores it to accelerate the search for the users by entering the data of the desired information.</span>
8 0
4 years ago
Read 2 more answers
Which site was launched by Ben t Smith iv
Kryger [21]

He launched the site "Wanderful Media".

5 0
3 years ago
Suppose there is a text file named "datafile.txt with some data in the root directory of your computer". Using your choice of la
aivan3 [116]

Answer:

See explaination for program code

Explanation:

code below

using System;

using System.IO;

namespace ReadAndDisplayFileCOnsole

{

class Program

{

static void Main(string[] args)

{

using (StreamReader reader = new StreamReader("D:\\datafile.txt"))

{

while (true)

{

string line = reader.ReadLine();

if (line == null)

{

break;

}

Console.WriteLine(line);

}

reader.Close();

Console.Read();

}

}

}

}

6 0
3 years ago
Write a program that input a number and display its precessor and successor number using function.
muminat

Answer:

def ask():

x = int(input("Pick a number: "))

p = x - 1

s = x + 1

print("The predecessor is {} and the successor is {}.".format(p, s))

ask()

Explanation:

"def ask():" and everything indented defines the function and "ask" calls the function.

6 0
3 years ago
Other questions:
  • An increase in Consumption will ___________ in the Classical Model of Aggregate Demand.
    13·1 answer
  • Which process alters readable data into unreadable form to prevent unauthorized access known as?
    8·1 answer
  • Should you configure if you want to limit access to files with certain classifications within a folder to a specific security gr
    13·1 answer
  • Riodic Table
    6·1 answer
  • Why would you want to hyperlink objects into your own Google Slides presentation? (Select all that apply.) Select All Correct Re
    14·1 answer
  • What is the primary difference between the windows server 2012 r2 server manager and previous versions (before windows server 20
    11·1 answer
  • In the context of intentional computer and network threats a ____ is a programming routine built into a system by its designer
    14·2 answers
  • How do u reverse image search on Android? ​
    9·1 answer
  • Inserting merge fields in the letter<br>steps required <br>plz ​
    11·2 answers
  • Create two functions to calculate the area and circumference of the circle using pointer.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!