Answer:
<em>Written in C++</em>
#include<iostream>
using namespace std;
int firstLast2(int arr[], int n);
int main()
{
int n;
cout<<"Number of Elements: ";
cin>>n;
int myarray[n];
for(int i = 0; i<n;i++)
{
cin>>myarray[i];
}
firstLast2(myarray, n);
return 0;
}
int firstLast2(int arr[], int n){
if(arr[0] == 2 || arr[n - 1] == 2)
{
cout<<"True";
}
else
{
cout<<"False";
}
}
Explanation:
<em>I've added the full source code as an attachment where I used comments to explain difficult lines</em>
Answer
Explanation:
Because the ability of the human brain is so limited. The ability of a computer processor is crazy good and fast.
Answer:
an accurate description exact stresses a very strict agreement with fact, standard, or truth. Exact measurements precise adds to exact an emphasis on sharpness of definition or delimitation.
PLEASE MARK ME AS BRAINLIEST ANSWER THANKS
Answer: some good skills to have at a job are: Able to work in a team. Another is to be able talk to others in a clear, kind voice that they can understand. I would say that the skills you need depend on what job you have. Some hands on, some computer skills, talking skills, it depends.
Explanation:
Answer:
import java.util.Scanner;
// Needed for the Scanner class This program calculates the user's gross pay.
public class Pay {
public static void main(String[] args) {
// Create a Scanner object to read from the keyboard.
Scanner keyboard = new Scanner(System.in);
// Identifier declarations
double hours;
// Number of hours worked
double rate;
// Hourly pay rate
double pay;
// Gross pay
// Display prompts and get input.
System.out.print("How many hours did you work? ");
hours = keyboard.nextDouble();
System.out.print("How much are you paid per hour? ");
rate = keyboard.nextDouble();
// Perform the calculations.
if (hours <= 40) {
pay = hours * rate;
}
else
{
pay = (hours - 40) - (1.5 * rate) + 40 - rate;
}
// Display results.
System.out.println("You earned $" + pay);
}
}
Explanation: