Answer:
The first one
Explanation:
The other ones don’t make sense
To create a directory, you can use the command mkdir. Below is an example:
mkdir /var/oracle/database/9i
Answer:
Correct Order
2. Select the cell or range you want to move or copy.
1. Move the pointer over the border of the selection until the pointer changes shape.
3. To move the range, click the border and drag the selection to a new location, or to copy the range, hold down the Ctrl key and drag the selection to a new location.
Explanation:
To move or copy range of cells in MS Excel, You first select the cell/range you want to move or copy, hover the mouse pointer and take note when it changes shape, then finally click the border (when you noticed the change of shape of the pointer) and hold down the ctrl key and drag it to the destination location.
Answer:
#include <iostream>
#include <vector>
using namespace std;
/* Define your function here */
vector<int> GetUserValues(vector<int>& userValues, int numValues) {
int tmp = 0;
vector<int> newVec;
for(int i = 0; i < numValues; i++) {
cin >> tmp;
newVec.push_back(tmp);
}
return newVec;
}
void OutputIntsLessThanOrEqualToThreshold(vector<int> userValues, int upperThreshold) {
for (int i = 0; i < userValues.size(); ++i) {
if(userValues.at(i) < upperThreshold) {
cout << userValues.at(i) << " ";
}
}
cout << endl;
}
int main() {
vector<int> userValues;
int upperThreshold;
int numValues;
cin >> numValues;
userValues = GetUserValues(userValues, numValues);
cin >> upperThreshold;
OutputIntsLessThanOrEqualToThreshold(userValues, upperThreshold);
return 0;
}
Explanation:
Perhaps their is a better way to code this, but I couldn't figure out what to do with the pointer in the first function.
Answer:
Here is the code for a classic C++ program that does it:
--------------------------------------------------------------------------------
#include <iostream>
using namespace std;
int main()
{
int sum = 0;
int n;
cout << "Input 10 numbers: " << endl;
for (int i = 0; i < 10; i++)
{
cin >> n;
sum += n;
}
cout << "Sum of the numbers: " << sum << endl;
}
--------------------------------------------------------------------------------
Explanation:
I'm assuming you know what "include", "using namespace std" and "int main()" do, so I will skip over those.
First, we declare a variable "sum" and initialize it with 0 so we can add numbers to it later.
Then, we declare a variable "n" that will be set as the input of the user.
The "for-loop" will iterate ( go ) from 0 to 9, and will set the value of "n" as the input that is given -> "cin >> n;". After that, we add the value of "n" to the sum variable.
After "i" reaches 9, it will exit the loop and proceed to printing the sum of the numbers.
Hope it helped!