Answer:
- import java.util.Random;
- import java.util.Arrays;
- public class Main {
-
- public static void main(String[] args) {
- int n = 10;
- int [] myArray = new int[n];
- buildArray(myArray, n);
- System.out.println(Arrays.toString(myArray));
- }
-
- public static void buildArray(int[] arr, int n){
- for(int i=0; i < arr.length; i++){
- Random rand = new Random();
- arr[i] = rand.nextInt(90) +10;
- }
- }
- }
Explanation:
Firstly, create a method buildArray that take two inputs, an array and an array size (Line 12). In the method, use random nextInt method to repeatedly generate a two digit random number within a for loop that will loop over array size number of times (Line 13-15). The expression rand.nextInt(90) + 10 will generate digits between 10 - 99.
In the main program, call the build array method by using an array and array size as input arguments (Line 8). At last, print the array after calling the buildArray method (Line 9).
Answer:
The code is designed using C++ with comments
Explanation:
#include<bits/stdc++.h>
using namespace std;
int main(){
int pay, hours; //declaring hourly pay rate and number of hours worked
cout<<"Enter hourly pay rate: "<<endl; //taking user input
cin>>pay;
cout<<"Enter hours worked: "<<endl; //taking user input
cin>>hours;
int gross;
if (hours<=40){
gross=hours*pay; //calculating gross pay
}
else if (hours>40){
gross=40*pay+(hours-40)*1.5*pay; //calculating gross pay for overtime
}
int withholding, netpay;
//calculation of withholding..
if (gross>1000){
withholding=(gross*28)/100;
}
else if (gross>600 && gross<=1000){
withholding=(gross*21)/100;
}
else if (gross<=600){
withholding=(gross*10)/100;
}
netpay=gross-withholding; //calculation of netpay
cout<<"Gross pay is $"<<gross<<endl; //output
cout<<"Net pay is $"<<netpay<<endl; //output
return 0;
}
The part of an I-statement that involves a description of
your needs or feelings is the Feelings Statement.
The feelings statement is a description of your feelings that is linked to a
particular situation. Vague feelings often create frustration in the listener.
In the CSS, background-image: url( "/path/to/file" )
http://www.w3schools.com is a handy reference.
Answer:
Answer is 3/4 inch.
Refer below.
Explanation:
The nominal maximum aggregate size allowed by the ACI 318-08 code is:
3/4 inch