Answer:
See explanation
Explanation:
Irrespective of the programming language, the input() function will allow Cheri's program to be able to accept user input.
Take for instance, the programming language is python, an expample of how the input function can be used is:
userinput = input("Enter a word: ")
The above instruction will allow her program to accept a string value.
The input() function can be used alongside different variable types.
A shortcut is a pointer to the file or folder located somewhere else. It is a small file that consumes a small size because it only gets the information to where the file is located. With shortcut, you can access the file at your convenience or to the new location.
Answer:
The complete method is as follows:
public static int divBySum(int[] arr, int num){
int sum = 0;
for(int i:arr){
if(i%num == 0)
sum+=i;
}
return sum;
}
Explanation:
As instructed, the program assumes that arr has been declared and initialized. So, this solution only completes the divBySum method (the main method is not included)
This line defines the method
public static int divBySum(int[] arr, int num){
This line declares and initializes sum to 0
int sum = 0;
This uses for each to iterate through the array elements
for(int i:arr){
This checks if an array element is divisible by num (the second parameter)
if(i%num == 0)
If yes, sum is updated
sum+=i;
}
This returns the calculated sum
return sum;
}
Answer:
bteasdale09
Explanation:
snap!!!!!!! above you have to be hot