149k views
2 votes
Store the following vector of 15 values as an object in your workspace: c(6,9,7,3,6,7,9,6,3,6,6,7,1,9,1). Identify the following elements: i. Those equal to 6 ii. Those greater than or equal to 6 iii. Those less than 6 2 iv. Those not equal to 6

User Merigrim
by
5.4k points

1 Answer

6 votes

Answer:

1.5

2.11

3.4

4.10

Explanation:

We are given that store the following vectors of 15 values as an object in your workspace :

6,9,7,3,6,7,9,6,3,6,6,7,1,9,1

We have to find the number of elements

1.equal to 6

2. equal or greater than 6

3.less than 6

4.not equal to 6

The 15 vectors are arrange in increasing order then we get

1,1,3,3,6,6,6,6,6,7,7,7,9,9,9

1.6,6,6,6,6

There are five elements which is equal to 6.

2.Number of elements equal or greater than 6=6,6,6,6,6,7,7,7,9,9,9=11

There are eleven elements which is equal or greater than 6.

3. Number of elements which is less than 6=1,1,3,3=4

There are four elements which is less than 6.

4.Number of elements which is not equal to 6=1,1,3,3,7,7,7,9,9,9=10

There are ten elements which is less than 6.

User JP Moresmau
by
4.8k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.