// Variable to keep track of array size
int length = 0;
// Array itself
int array[] = {};
// while loop will take input in the array until a negative number is entered
while(input>=0){
stdin = new Scanner(System.in);
array[length] = stdin;
length +=1;
}
// int variable to terminate while loop
int i =0;
// keep track of index of output array
int y =0;
while(arr[i] != length){
// making output array
int output[]={}; bool flag;
// put the element in out put array considering if it the desired one
output[y] = array [i];
// Now check if it was the desired?
for(int z=1;z<=length;z++){
if(array[i+z]!=output[y]){
flag = true;
}
else
{
output[y]=0;
y+=1;
}
if(array[i+z+1]=output[y] && flag == true){
output[y] = array[i];
y+=1;
}
}
//output the array
for(int o=0;o<y;o++)
System.out.println(output[o];
Make the zig zag part more spaced out
Answer:
- The graph of the function is attached below.
- The x-intercepts will be: (2, 0), (-2, 0)
- The y-intercept will be: (-20, 0)
Explanation:
Given the function
As we know that the x-intercept(s) can be obtained by setting the value y=0
so
switching sides
Add 20 to both sides
Dividing both sides by 5
so the x-intercepts will be: (2, 0), (-2, 0)
we also know that the y-intercept(s) can obtained by setting the value x=0
so
so the y-intercept will be: (-20, 0)
From the attached figure, all the intercepts are labeled.
Answer:
Grade C
Explanation:
The if condition states if the score will be greater than or equal to 90 then the program will print grade = 'A', if the score will be greater than or equal to 80 then the program will print grade = 'B'.
A program checks conditions line by line until the condition is met, so when you enter 71, it goes through the first condition i.e. score >= 90, which is false because 71 is less than 90.
Then the second condition, score >= 80, which is false again because 71 is less than 90.
In the third condition, it is true that score >=70, then the program prints grade 'C'.