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
trasher [3.6K]
3 years ago
5

Write bash script which takes array as an input of size 10 bind its even indexes to accept even values and odd indexes to accept

odd numbers only. Print invalid input if given input is not valid.
Computers and Technology
1 answer:
jenyasd209 [6]3 years ago
6 0

Answer:

Bash script which takes array as an input of size 10 bind its even indexes to accept even values and odd indexes to accept odd numbers only is explained below in detail.

Explanation:

Even digits at an even table and odd digits at an odd table

Given an array of size n comprising an equal number of odd and even digits. The difficulty is to manage the numbers in such an approach that all the even digits get the even table and odd digits get the odd table. The necessitated auxiliary space is O(1).

Examples :

Input : arr[] = {8, 5, 1, 12, 6, 3}

Output : 3 6 1 12 5 8

Input : arr[] = {7, 9, 10, 19, 13, 18, 21, 20, 4, 14}

Output : 18 9 10 19 20 7 14 13 4 21

You might be interested in
What is the most appropriate data type for each of these items?
Tom [10]
I may be wrong, BUT here is what i think



b) line graph


d) pie graph
7 0
2 years ago
FREE BRAINLIEST!!!
Nastasia [14]

Answer:

B

Explanation:

4 0
3 years ago
Read 2 more answers
Select the true statement about the motherboard.
Nata [24]

Answer:

it executes the commands sent to it by the applica software .

8 0
2 years ago
Given input characters for an arrowhead and arrow body, print a right-facing arrow. Ex: If the input is: *
MrRa [10]

Answer:

Following are the code to this question:

b= input()#defining b variable for input character value

h= input()#defining h variable for input character value

b_width=6#defining b_width variable that holds an integer value 6

r1 = ' ' * b_width+h#defining r1 variable that calculates hash lines

r2 = b*b_width+h*2#defining r3 variable that calculates 6 asterisk and 2 hash line  

r3 = b*b_width+h*3#defining r3 variable that calculates 6 asterisk and 3 hash line

print(r1)#print r1 variable value

print(r2)#print r2 variable value

print(r3)#print r3 variable value

print(r2)#print r2 variable value

print(r1)#print r1 variable value

Output:

please find the attachment.

Explanation:

In the given python code, three variable "b,h, and b_width" is declared, in which "b_width" holds an integer variable "6" and variable "b and h" is used to an input character value.  In the next line, "r1, r2, and r3" is declared, that holds arrowhead values which can be defined as follows:

  • In the "r1" variable, it stores space with b_width variable and one h variable value.
  • In the "r2" variable it stores b_width and 2*h variable value.
  • In the "r3" variable it stores b_width and 3*h variable value.

At the last, it prints the "r1, r2, and r3" variable value and for arrowheads,  it follows the above program code.

6 0
3 years ago
The new tag in HTML 5 means that it explanation or pronunciation of characters for Asian typography O sets a container for an ex
Eddi Din [679]

Answer:

yes very correctExplanation:

5 0
2 years ago
Other questions:
  • If anybody knows what does this mean I will answer any questions for you and plz answer this right plz what does that envelope w
    5·2 answers
  • Head-mounted displays often use organic light emitting diode,or technology.
    15·1 answer
  • Which of these image sizes takes the most storage space?
    8·2 answers
  • What type of function is being performed when a router screens packets based on information in the packet header
    8·1 answer
  • What is a bitmap ???
    13·2 answers
  • Write a Java statement to create an object LG of class TvSets
    11·1 answer
  • Whats the difference between Input and Output? Give and example of an example on a M:B​
    15·1 answer
  • Write a program to find the principle amount​
    10·1 answer
  • Davids family took him to a hospital as he was suffering from a sericous ailment
    8·1 answer
  • Describe four traditional tehniques for collecting information during analysis.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!