JAVA programming was employed...
//IMPORT STATEMENT
import javax.swing.JOptionPane;
public class Payroll
{
//VARIABLE DECLARATION
double grossPay, hoursWorked, payRate;
//INPUT STATEMENT
hoursWorked = Double.paseDouble(JOptionPane.showInputDialog(Please enter your hours worked.));
payRate = Double.paseDouble(JOptionPane.showInputDialog(Please enter the pay rate per hour.));
//PROCESS STATEMENT
grossPay = hoursWorked * payRate;
//OUTPUT STATEMENT
JOptionPane.showMessageDialog(null, grossPay);
}//End of class Payroll
In this program, we declared variables grossPay, hoursWorked, and payRate to double so that the user can input figures with decimal. Since the inputs have decimal, the output which is grossPay will come out with decimal.
But note that inputting numbers doesn't mean that they will be processed as double automatically! For the inputted values to become double, it is important to parse them first that is why the line "hoursWorked = Double.paseDouble(JOptionPane.showInputDialog(Please enter your hours worked.));" and line "payRate = Double.paseDouble(JOptionPane.showInputDialog(Please enter the pay rate per hour.));" were used.
Press the home button and power button at the same time
Answer:
#include<iostream>
#include <vector>
#include <list>
using namespace std;
int main(){
int a[10]={0,1,2,3, 4, 5, 6, 7, 8, 9 };
std::vector<int> v (&a[0],&a[0]+10);
std::list<int> l (&a[0],&a[0]+10);
int b[10];
for(int i=0;i<10;i++){
b[i]=a[i];
}
std::vector<int> v2(v);
std::list<int> l2(l);
for(int i=0;i<10;i++){
b[i]+=2;
}
for(int i=0;i<10;i++){
v2[i]+=3;
}
for (std::list<int>::iterator it = l2.begin(); it != l2.end(); it++)
*it=*it+5;
cout<<"Each containers value are: "<<endl;
cout<<"1st array: "<<endl;
for(int i=0;i<10;i++){
cout<<a[i]<<" ";
}
cout<<"\n 1st vector: \n";
for(int i=0;i<10;i++){
cout<<v[i]<<" ";
}
cout<<"\n 1st List is:\n";
for (std::list<int>::iterator it = l.begin(); it != l.end(); it++)
cout << *it << ' ';
cout<<"\n 2nd array: "<<endl;
for(int i=0;i<10;i++){
cout<<b[i]<<" ";
}
cout<<"\n 2nd vector:\n";
for(int i=0;i<10;i++){
cout<<v2[i]<<" ";
}
cout<<"\n 2nd list:\n";
for (std::list<int>::iterator it = l2.begin(); it != l2.end(); it++)
cout << *it << ' ';
return 0;
}
Explanation:
- Initialize an array, a vector and a list of type integer
.
- Create a 2nd array, vector, and list as a copy of the first array, vector, and list.
- Increase the value of each element in the array by 2
, vector by 3 and list by 5.
- Finally display the relevant results.
Answer: D.) LEFT
Explanation: LEFT is an excel function allows users to extract a specified number of characters starting from the left. The syntax goes thus :
=LEFT(text, [num_chars])
text: the original string in which characters are to be extracted.
num_chars : takes an integer, stating the number of characters to extract.
The proper function is also an excel function which sets the first character in each word to uppercase. The mid function is also used in text extraction starting from any position in the original string based on what is specified.
The LEN function is used to get the number or length of characters in a string.
Answer: yall are so mean i had to edit this
Explanation: I had that for so long lol