Answer:
if(x>12 || x<34)
Explanation:
Mashing the two together using the or '||' operator would allow to run both necessary functions for the next code.
Stack is LIFO data structure (Last In First Out) where the last element entered in stack will be the last one to be out of stack. It has three operations: push() : used to insert an element in stack, pop() : used to delete an element from the stack, top() : used to return the top of the stack i.e. the newest member of the stack. All these operations will take place at the top.
<u>Explanation:</u>
Now, looking at the program, x and y are initialized the values of 2 and 3 respectively. The stack pushes 8 onto the stack making it the first member of the stack. Then the value of x which is 2 is pushed onto the stack. Next, (x+5) = (2+5) = 7 is pushed onto the stack.
Pop() is used to delete hence 7 is popped out from the stack. top() is assigned to y which is 2 in this case and again 2 is popped out from the stack. Now, (x+y) = (2+2) = 4 is pushed onto the stack. And the top() is assigned to x which is 4. 4 is again popped out from the stack. Hence the value of x is 4.
Answer:
hope this helps and do consider giving a brainliest to the ans if it helped.
Explanation:
//program to check if the entered grid is magic square or not
/**c++ standard libraries
*/
#include<bits/stdc++.h>
using namespace std;
/**function to check whether the entered grid is magic square or not
*/
int isMagicSquare(int arr[3][3]){
int i,j,sum=0,sum1=0,rsum,csum;
for(i=0;i<3;i++){
sum+=arr[i][i];
sum1+=arr[i][2-i];
}
if(sum!=sum1){
return 0;
}
for(i=0;i<3;i++){
rsum=0;
csum=0;
for(j=0;j<3;j++){
rsum+=arr[i][j];
csum+=arr[j][i];
}
if(sum!=rsum){
return 0;
}
if(sum!=csum){
return 0;
}
}
return 1;
}
/** main function to get user entries and
* call function
* and print output
*/
int main(){
int i,j,arr[3][3]={0};
for(i=0;i<3;i++){
for(j=0;j<3;j++){
cout<<"Enter the number for row "<<i<<" and column "<<j<<" : ";
cin>>arr[i][j];
}
}
int ret = isMagicSquare(arr);
if(ret==1){
cout<<"This is a Lo Shu magic square"<<endl;
}
else{
cout<<"This is not a Lo Shu magic square"<<endl;
}
return 0;
}
Answer:
The most probable reason for this is A.
Explanation:
B should be wrong because the TV being connected to a different network segment still means that it is on the Wi-Fi network, it is just using a different switch or a repeater.
C should be wrong because the brightness of the TV does not have anything to do with being able to connect to the phone.
D should be wrong because in the question itself it says that "you tap the mirroring option on your device" which clearly means that the mobile device supports display mirroring.
The answer should be A, if the device and the TV are not on the same Wi-Fi network, than they simply can not connect and the mirroring can not be done.
I hope this answer helps.