Answer:
- #include <stdio.h>
-
- bool IsArrayEven(int inputVals[], int numVals){
- int i;
- for(i = 1; i < numVals; i++){
- if(inputVals[i] % 2 != 0){
- return false;
- }
- }
- return true;
- }
-
- bool IsArrayOdd(int inputVals[], int numVals){
- int i;
- for(i = 1; i < numVals; i++){
- if(inputVals[i] % 2 == 0){
- return false;
- }
- }
- return true;
- }
-
- int main()
- {
- int my_input[] = {5, 2, 4, 6, 8, 10};
-
- if(IsArrayEven(my_input)){
- printf("all even");
- }else if(IsArrayOdd(my_input)){
- printf("all odd");
- }else{
- print("not even or odd");
- }
- }
Explanation:
Firstly, write two functions to check if the input array is all even or all odd (Line 3-22). The key idea is to use modulus operator to check if a number % 2 equal to 0, it is an even number, if not, it is an odd. So long as one of the number is odd in the isArrayEven function, the function shall return false (Line 7). If no odd value detected, it return true (Line 11). The similar code logic is applied to isArrayOdd function too.
Then, we can call the two functions sequentially in the main program. If isArrayEven function return true, it display all even message (Line 28-29). If odd, display all odd (Line 30 -31). If neither, display not even or odd (Line 32-33).
Answer:
La tecnología informática ayuda a las personas a obtener información más rápido, hace que las personas vivan mejor. La computadora tiene muchos usos en diferentes aspectos de la vida, como investigación, propósitos educativos, juegos, videollamadas y otros. Ayuda a las personas a realizar operaciones bancarias y a acceder al dinero fácilmente. también se utiliza en entretenimiento, ciencia y aprendizaje.
Answer:
account recovery
Explanation:
account recovery, provides options for getting access to your old password or resetting the account to a temporary password; users will change to a permanent password upon first login.
Hi. I am not sure if there should be choices included in your post. If there is none, I'll just share a circumstance to where a professional practices confidentiality as an answer.
Counselors or psychotherapists can only divulge information about their clients or patients if there is a court order or if the client will harm him/her self or plan to harm others. Primarily, they are to respect the client's choice to keep the sessions with full confidentiality.
·<span>social security number
</span>·<span>completion of high-school education
·Submission of the </span><span>FAFSA (this is the form you fill out to receive the financial aid)</span>