Your Perfect Assignment is Just a Click Away

We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Input Array and Array Javascript Project

Input Array and Array Javascript Project

Description

##1. Given an array of length, write a program that finds all the integers in the range [1, n] that do not appear in a. For example,if an input array of length 5contains {4, 3, 3, 2, 2}.The output willbe1 and5, all the integers in the range [1, 5] that do not appear in the input array.

Example input/output#1:

Enter the length of the input array:4

Enter the elements of the input array: 2 41 4

Output: 3

Example input/output#2:

Enter the length of the input array:8

Enter the elements of the input array: 4 3 7 1 3 2 8 2

Output: 5 6

1)Name your program arrays1.c.

2)In the main function, the program will ask the user to enter the length of the array and the elements of the array. Assume the elements entered are in the range of[1,n], where n is the length of the array.

3)Include the function find()in the program.Thefind()function finds all the integers in the range [1, n] that do not appearin a.

void find(int a[],int n, int b[]);

Array b should be of size n and contains 0s and 1s. An element of bis 1 if the (index of that element + 1) appears ina, and 0 otherwise.For example, an input array of length 5contains {4, 3, 3, 2, 2}, array b will be {0, 1, 1, 1, 0}.

4)The main function calls the find function and displays the output.


##2. Write a program that checks if two arrays of the same length match after some number of shifts on the first array. A shift on an array means moving the leftmost element to the rightmost position. For example, if array contains {4, 6, 1, 2}, then it will be {6, 1, 2, 4} after one shift. If array b contains {1, 2, 4, 6}, then array matches array bafter 2 shifts. Your program will display “true”if and only if array a can become array b after some number of shift on a. Your program will display “false” otherwise.

Example input/output#1:

Enter the length of the input array:4

Enter the elements of the first array: 2 81 4

Enter the elements of the second array: 1 4 8 2

Output: false

Example input/output#2:

Enter the length of the input array:5

Enter the elements of the first array: 4 6 7 1 3

Enter the elements of the second array: 1 3 4 6 7

Output: true

1)Name your program arrays2.c.

2)In the main function, the program will ask the user to enter the length of the arrays and the elements of each array.

3)Include the function shift()in the program.Theshift()functionmovesthe leftmost elementofarrayato the rightmost position.

void shift(int a[],int n);

4)The main function calls the shift function, evaluates the arrays, and displays the result.

#Programming Style Guidelines:

1. Your program should begin with a comment that briefly summarizes what it does. This comment should also include your name.

2. In most cases, a function should have a brief comment above its definition describing what it does. Other than that, comments should be written only needed in order for a reader to understand what is happening.

3. Variable names and function names should be sufficiently descriptive that a knowledgeable reader can easily understand what the variable means and what the function does. If this is not possible, comments should be added to make the meaning clear.

Our Service Charter

1. Professional & Expert Writers: Writing Expert only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Writing Expert are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Writing Expert is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Writing Expert, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

Our Service Charter

1. Professional & Expert Writers: Writing Expert only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Writing Expert are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Writing Expert is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Writing Expert, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.