Write a script called fact.sh that is located in your workspace directory to calculate the factorial of a number n; where n is a non-negative integer between 1 and 20 that is passed as a parameter from the command line (e.g. ./fact.sh 5). The result should be echoed to the screen as a single integer (e.g. 120).
NOTE: Do not include any other output, just output the single integer result.
Submit your code to the auto-grader by pressing Check-It!
NOTE: You can submit as many times as you want up until the due date.

Answers

Answer 1

Answer:

hope this helps

Explanation:

Write A Script Called Fact.sh That Is Located In Your Workspace Directory To Calculate The Factorial

Related Questions

Two character strings may have many common substrings. Substrings are required to be contiguous in the original string. For example, photograph and tomography have several common substrings of length one (i.e., single letters), and common substrings ph, to, and ograph as well as all the substrings of ograph. The maximum common substring length is 6. Let X = X122 . Im and Y = yıy2 - - • Yn be two character strings. Using dynamic programming, design an algorithm to find the maximum common substring length for X and Y using dynamic programming. Please follow the general steps for designing a dynamic programming solution as in Q1 (other than the actual programming part).

Answers

Answer:

Explanation:

The following function is written in Java. It takes two strings as parameters and calculates the longest substring between both of them and returns that substring length.

import java.util.*;

class Test

{

   public static void main(String[] args)

   {

       String X = "photograph";

       String Y = "tomography";

       System.out.println(X + '\n' + Y);

       System.out.println("Longest common substring length: " + longestSub(X, Y));

   }

   static int longestSub(String X, String Y)

   {

       char[] word1 = X.toCharArray();

       char[] word2 = Y.toCharArray();

       

       int length1 = X.length();

       int length2 = Y.length();

       int substringArray[][] = new int[length1 + 1][length2 + 1];

       int longestSubstringLength = 0;

       

       for (int i = 0; i <= length1; i++)

       {

           for (int j = 0; j <= length2; j++)

           {

               if (i == 0 || j == 0)

                   substringArray[i][j] = 0;

               else if (word1[i - 1] == word2[j - 1])

               {

                   substringArray[i][j]

                           = substringArray[i - 1][j - 1] + 1;

                   longestSubstringLength = Integer.max(longestSubstringLength,

                           substringArray[i][j]);

               }

               else

                   substringArray[i][j] = 0;

           }

       }

       return longestSubstringLength;

   }

}

Taran is concerned with the security of his macros in a database. Which security option could he use to provide protection?

digital signatures
hide database objects
start-up options
secure VBA code

Answers

Answer:security VBA code

Explanation:

Need help with 9.2 Lesson Practice edhesive asap please

Answers

Answer:

Can you add an attachment please

In this exercise we have to use the computer language knowledge in python, so the code is described as:

This code can be found in the attached image.

So the code can be described more simply below, as:

height = []

height.append([16,17,14])

height.append([17,18,17])

height.append([15,17,14])

print(height)

See more about python at brainly.com/question/26104476

The variable strFirst's scope is _____.

Answers

pretty sure it’s d, hope this helps

Answer:

- the usernameMaker function

Explanation:

When you look at the code, you can see it's located alongside the usernameMaker. It it only utilized then, therefore being it's scope. For reassurance, it's also correct on Edge.

I hope this helped!

Good luck <3

Mohammed needs to ensure that users can execute a query against a table but provide different values to the query each time it is run. Which option will achieve this goal?

parameter queries
dynamic queries
query joins
static queries

Answers

Answer:

the answer is B

Explanation:

Which tab can be used to change the theme and background style of a presentation?
O Design
O Home
O Insert
O View

Answers

Answer:

Design

Explanation:

seems the most correct one..

I would say design as well.

In the code snippet below, pick which instructions will have pipeline bubbles between them due to hazards.

a. lw $t5, 0($t0)
b. lw $t4, 4($t0)
c. add $t3, $t5, $t4
d. sw $t3, 12($t0)
e. lw $t2, 8($t0)
f. add $t1, $t5, $t2
g. sw $t1, 16($t0)

Answers

Answer:

b. lw $t4, 4($t0)

c. add $t3, $t5, $t4

Explanation:

Pipeline hazard prevents other instruction from execution while one instruction is already in process. There is pipeline bubbles through which there is break in the structural hazard which preclude data. It helps to stop fetching any new instruction during clock cycle.

Write an algorithm (pseudo-code) that takes an unsorted list of n integers and outputs a sorted list of all duplicate integers. There must be no duplicates in the output list, also the output list should be a sorted list. The algorithm must run in O(n) time. Show your analysis of the running time. Note: Assume that inputs are integer values from 0 to 255. (Hint: use the concept that being used in the separate chaining)

Answers

Answer:

brainliest if it did help you

Explanation:

Given array : A[0...n-1]Now, create a count array Cnt[0...n-1]then, initialize Cnt to zero

for(i=0...n-1)

Cnt[i]=0 ---------O(n) time

Linearly traverse the list and increment the count of respected number in count array.

for(i=0...n-1)

Cnt[A[i]]++; ---------O(n) time

Check in the count array if duplicates exist.

for(i=0...n-1){

if(C[i]>1)

output (i); -----------O(n) time

}

analysis of the above algorithm:

Algorithm takes = O(1 + n + n + n)

                           = O(n)          

//java code

public class SortIntegers {

  public static void sort(int[] arr) {

    int min = arr[0];

    int max = arr[0];

    for (int i = 0; i < arr.length; ++i) {

      if (arr[i] > max) {

        max = arr[i];

      }

      if (arr[i] < min) {

        min = arr[i];

      }

    }

    int counts[] = new int[max - min + 1];

    for (int i = 0; i < arr.length; ++i) {

      counts[arr[i] - min]++;

    }

    for (int i = 0; i < counts.length; ++i) {

      if (counts[i] > 1) {

        System.out.print((i + min) + " ");

      }

    }

    

    System.out.println();

  }

  public static void main(String[] args) {

    sort(new int[] { 5, 4, 10, 2, 4, 10, 5, 3, 1 });

  }

}

The Basic premise of____is that objects can be tagged, tracked, and monitored through a local network, or across the Internet.
The basic premise of
a. artificial intelligence
b. intelligent workspaces
c. the Internet of Things
d. the digital divide

Answers

Answer:

C.

Explanation:

Internet of things

The Basic premise of the Internet of Things is that objects can be tagged, tracked, and monitored through a local network, or across the Internet option (c) is correct.

What is IoT?

The term "Internet of things" refers to actual physical items that have sensors, computing power, software, and other innovations and can link to those other systems and gadgets via the Internet or other communication networks and share files with them.

As we know,

Using a local network or the Internet, things may be identified, tracked, and monitored is the fundamental tenet of the Internet of Things.

Thus, the Basic premise of the Internet of Things is that objects can be tagged, tracked, and monitored through a local network, or across the Internet option (c) is correct.

Learn more about the IoT here:

https://brainly.com/question/25703804

#SPJ2

When it comes to having certain sales skills as a hotel manager, being able to really hear, learn about, and show customers that the products/services you offer will meet their needs is a vital skill to have. When you show customers that you truly hear their needs, what sales skill are you practicing?
active listening
product knowledge
communication
confidence

Answers

Answer:

Communication

Explanation:

The ability to communicate clearly when working with customers is a key skill because miscommunications can result in disappointment and frustration. The best customer service professionals know how to keep their communications with customers simple and leave nothing to doubt.

Explain the five generations of computer

Answers

Answer:

1 First Generation

The period of first generation: 1946-1959. Vacuum tube based.

2 Second Generation

The period of second generation: 1959-1965. Transistor based.

3 Third Generation

The period of third generation: 1965-1971. Integrated Circuit based.

4 Fourth Generation

The period of fourth generation: 1971-1980. VLSI microprocessor based.

5 Fifth Generation

The period of fifth generation: 1980-onwards. ULSI microprocessor based.

The phrase "generation" refers to a shift in the technology that a computer is/was using. The term "generation" was initially used to describe different hardware advancements. These days, a computer system's generation involves both hardware and software.

Who invented the 5th generation of computers?

The Japan Ministry of International Trade and Industry (MITI) launched the Fifth Generation Computer Systems (FGCS) initiative in 1982 with the goal of developing computers that use massively parallel computing and logic programming.

The generation of computers is determined by when significant technological advancements, such as the use of vacuum tubes, transistors, and microprocessors, take place inside the computer. There will be five computer generations between now and 2020, with the first one starting around 1940.

Earlier models of computers (1940-1956)Computers of the Second Generation (1956-1963)Computers of the Third Generation (1964-1971)Computers of the fourth generation (1971-Present)Computers of the fifth generation

Learn more about generations of computers here:

https://brainly.com/question/9354047

#SPJ2

Other Questions
im wasting my pOiNtS in the comments sing a song and or answer so you get points Given m||n, find the value of x. James bought 12 cookies and ate 3 of them. He ate __ % of the cookies. (Make sure to enter the answer using numbers only. Do not enter special characters such as the percent symbol.)Blank 1: 2) Zack ran 6 miles this weekend. How many feet did Zack run over the weekend? Please help ITS URGENT ,Thank youu Which of the following is not a difference between photosynthesis and cellular respiration? Explain the societal and cultural factors that may contribute to the high childhood and maternal mortality rates in sub- Saharan Africa. At Jefferson Middle School, 3/5 of the students play a sport. Of those students, 1/3 play soccer. What equation can be used to find what fraction of the students play soccer?13+3513351335 Which of these are types of sequences and motives?SequenceMotiveAntiphonsResponsorialOstinato Can yall help me fin the height In the code snippet below, pick which instructions will have pipeline bubbles between them due to hazards. a. lw $t5, 0($t0) b. lw $t4, 4($t0) c. add $t3, $t5, $t4 d. sw $t3, 12($t0) e. lw $t2, 8($t0) f. add $t1, $t5, $t2 g. sw $t1, 16($t0) help me, please please fast hayley wants to attend bellhaven collage after high school. she knows that the yearly cost is around $17000 per year. her parents started a college account for her when she was born with an inital amount 2000 and a 6% simple interest rate. it has been open for 18 years. hayley will also be given an academic achievement scholarship for $1000 for her first year of college. how much more will hayley need in order to pay for her first year of college if she uses all of the money she has available? Please show work too. You get 13 points if you answer and show your work. Please help me!Ill give brainly 100 poiints need help asap plzz and i will give brainlest A figure is broken into a rectangle and a triangle. The triangle has a base of 8 inches and a height of 6 inches. The rectangle has a base of 8 inches and a height of 4 inches.An irregular figure was broken into a triangle and rectangle.The area of the triangle is ____ in2.The area of the rectangle is ____ in2.The area of the irregular figure is ____ in2 what is 1 + 1if the answer is 2 then why is it 2 7. If the total number of books checked out of the library at your high school is 14,400 and the student populationis about 2400. How many books on average does each student have? Pls help with this its 3:44 AM for me, Im in my study room trying to figure out how to solve this and I still didnt finish My math work cuz I didnt know howw ( due tomorrow ) and its getting rlly late so can u guys help me?? ty I really need help lol...you get 81 POINTS!!!!!!!!!!!!!!!!!! what are the next two terms in the sequence?: 1, -2, 4, -8 Romeo and Juliet are married .Romeo has to leave town .what should they do in this situation ?why?