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]
2 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]2 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]2 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
You want to look up colleges but exclude private schools. Including punctuation, what would you
Orlov [11]

Answer:

the 3rd

Explanation:

8 0
3 years ago
Read 2 more answers
Cmo se puede añadir amigo ??'
seropon [69]

Answer:ok

Explanation:

5 0
3 years ago
What is the purpose of a mail merge field?
Alex73 [517]

Answer:

to set up placeholders in a document where data will be inserted

4 0
3 years ago
Read 2 more answers
Which type of game requires you to read people’s expressions to anticipate their moves?
Irina-Kira [14]

Answer:

Chess-type games

Explanation:

5 0
2 years ago
Write a C++ function with the following signature: void readAndConvert() The function takes no parameters and returns no value.
shepuryov [24]

Answer:

The function is as follows:

void readAndConvert(){

   int n; string symbol,name;

   cin>>n;

   cin>>symbol;

   cin.ignore();

   getline (cin,name);

   vector<string> trades;

   string trade;

   for (int inps = 0; inps < n; inps++){

       getline (cin,trade);

       trades.push_back(trade);}

   

   cout<<name<<" ("<<symbol<<")"<<endl;

   for (int itr = 0; itr < n; itr++){

       string splittrade[3];        int k = 0;

       for(int j=0;j<trades.at(itr).length();j++){

           splittrade[k] += trades.at(itr)[j];

           if(trades.at(itr)[j] == ' '){

               k++;    }}

cout<<splittrade[2]<<": "<<floor(stod(splittrade[1]) * stod(splittrade[0]))<<endl;        }

   }

Explanation:

See attachment for complete program where comments are used to explain each line

Download cpp
4 0
2 years ago
Other questions:
  • In addition to not parking where signs prohibit it, you should never park __________________.
    12·1 answer
  • What does BMP stand for?
    10·2 answers
  • The process of changing data from their original form to a format that more closely fits the research objectives of the research
    9·1 answer
  • A company is utilizing servers, data storage, data backup, and software development platforms over an Internet connection.
    14·1 answer
  • Can you give me a long list of anime
    6·2 answers
  • Why might you receive a tax refund from the irs
    6·1 answer
  • Which search engine does not track users? Choose the answer.
    10·2 answers
  • Write a class called TextProcessor that implements the methods listed below. Your implementation may use the charAt() and length
    14·1 answer
  • A DTP firm has published and printed fliers for an upcoming fundraising event. In which section of the flyer would you find the
    10·1 answer
  • _________ is the method used by password crackers who work with pre-calculated hashes of all passwords possible within a certain
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!