Answer:
# include<iostream>
# include<stdio.h>
# include<stdlib.h>
using namespace::std;
int main()
{
int *a=NULL;
int n; int score=0;
cout<<"Enter the value of N";
cin>>n;
a=new int[n];
cout<<"Enter the elements of a";
for(int i=0;i<=n;i++)
{
cin>>a[i];
}
int num=n;int k=n;int j=num;
while(j>=num)
{
if(n%2==0)
{
for(int i=0;i<=k;i++)
{
score+=a[i];cout<<score; }
if(a[0]>a[n])
{
a[n]=0;
n--;
}
else if(a[0]<a[n])
{
a[0]=0;
n--;
}
else if(n==1)
{
exit(0);
}
}
else
{
for(int i=0;i<=n;i++)
{
score-=a[i];
}
if(a[0]>a[n])
{
a[n]=0;
n--;
}
else if(a[0]<a[n])
{
a[0]==0;
n--;
}
else
{
exit(0);
}
}
j--;
}
cout<<"score"<<score;
return 0;
}
Explanation:
The array above is created dynamically, and rest is as mentioned in question.
Answer:
I'm leaning towards D - Peer Pressure. But it could also be B - Stress. I'm just not 100% sure.
Answer:
sidebar
Explanation:
The part of the webpage that is being described in this question is known as a sidebar. These are the far left/right sides of the webpage and are usually used for networking feeds, ads, related information, major points of the main page, biographical info, as well as persuasive information. This section of the webpage serves two main purposes to provide the viewer with advertisements and to encourage the reader to read the more detailed main article.