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
Vladimir79 [104]
3 years ago
13

Create a program that finds (n+1)! -factorial- of an integer n in C++.

Computers and Technology
1 answer:
Akimi4 [234]3 years ago
6 0

Answer:

Any options?

Explanation:

You might be interested in
Define a function typeHistogram that takes an iterator ""it"" (representing a sequence of values of different types) and builds
Alexeev081 [22]

Answer:

def typeHistogram(it,n):

   d = dict()

   for i in it:

       n -=1

       if n>=0:

           if str(type(i).__name__) not in d.keys():

               d.setdefault(type(i).__name__,1)

           else:

               d[str(type(i).__name__)] += 1

       else:

           break

   return list(d.items())

it = iter([1,2,'a','b','c',4,5])

print(typeHistogram(it,7))

Explanation:

  • Create a typeHistogram function that has 2 parameters namely "it" and "n" where "it" is an iterator used to represent a sequence of values of different types while "n" is the total number of elements in the sequence.
  • Initialize an empty dictionary and loop through the iterator "it".
  • Check if n is greater than 0 and current string is not present in the dictionary, then set default type as 1 otherwise increment by 1.
  • At the end return the list of items.
  • Finally initialize the iterator and display the histogram by calling the typeHistogram.
3 0
2 years ago
When you go to a website, your web browser requests a web page from:
lakkis [162]

Answer: web server

Explanation:

When you go to a website, your web browser requests a web page from the web server. For this to happen, the IP address for the webpage has to be identified first, tmaftee which the browser will request appropriate data from the web server.

Such request comes in form of data packet and takes place through HTTP and.utnhas all the necessary information that is needed by the web server for the delivery of the webpage data.

3 0
3 years ago
How do you view a presentation as your audience would see it?
Nutka1998 [239]
<h3>Answer:</h3>

Option B is the correct answer.

=> By clicking slideshow button.

<h3>Explanation:</h3>

A view in which audience should see the presentation is the SLIDE SHOW VIEW.

Slide show can be started by clicking on the Slide show tab than choose one of the desired option/ways to SET UP SLIDE SHOW.

<h3>I HOPE IT WILL HELP YOU!</h3>
5 0
3 years ago
Read 2 more answers
Determine the number of character comparisons made by the brute-force algorithm in searching for the pattern GANDHI in the text
leonid [27]

Answer:

Total number of character comparison = 43

Explanation:

Using the Brute force algorithm

The string of n characters is known as text, and the string of m characters is known as the pattern.

From the given information:

The text (n)=THERE_IS_MORE_TO_LIFE_THAN_INCREASING_ITS_SPEED

The pattern (m) = GANDHI

The total no of characters that we have in the text = 47

The total number of characters in pattern = 6

For a brute force algorithm;

Since; the first character of the pattern does not exist in the text, then the number of trials made can be attempted can be expressed as = n – m + 1

= 47 – 6 + 1

= 47 – 5

= 42

Thus; the algorithm will attempt the trial 42 times.

Now, for loop in the algorithm to run 42 times, the G in the pattern will have to align against the for T in the text, and in the last case, it will be aligned against the last space.

On each attempted trial, the algorithm will make one unsuccessful comparison.

However, at the trial at which the G in the pattern Is aligned with the G in the text, there will be two successful comparisons.

Hence, we can calculate the total number of character comparison as follows:

Total number of character comparison = \mathbf{\bigg ( ( 42 -  (no. \ of \  failed \ comparison) ) \times 1 + (1 \times ( Two \ successful \  comparisons) ) \bigg ) }

Total number of character comparison = ( (( 42 – 1) × 1 ) + ( 1 × 2) )

Total number of character comparison = 41 + 2

Total number of character comparison = 43

3 0
3 years ago
What is cyber safety?
mario62 [17]

Answer: Cyber safety is a process that protects computers and networks. The cyber world is a dangerous place without security and protection.

Explanation: Hope this helps!

7 0
3 years ago
Other questions:
  • In what year did commercial use of the Internet become available? 1991 1996 1999 2001
    9·1 answer
  • Data cannot be sorted of filtered accurately if there are ________.
    10·2 answers
  • If you want an app to reach the largest possible audience, which two platforms should you use?
    7·1 answer
  • If a full disk encryption (FDE) password is forgotten, what can be incorporated to securely store the encryption key to unlock t
    13·1 answer
  • During the Cold War, defense contractors were required to shield sensitive computing systems and prevent electronic eavesdroppin
    14·1 answer
  • Listening to music on giggl, join!<br><br> link will be in comments, copy and paste
    9·2 answers
  • Correct all the mistakes in the following sentence:
    15·2 answers
  • El botón de layout se usa para <br>​
    8·1 answer
  • How would a barcode reader be used in a healthcare industry?​
    6·1 answer
  • Consider a game that is searched using random restart hill climbing strategy. Assume that the success rate for the game is 25%.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!