Answer the question
In order to leave comments, you need to log in
How to write a program to determine the symmetry of a one-dimensional array of k elements?
That's all I could write, I can not understand further.
How to write that you need to compare the first and last elements in an array? Or is there another way to record such a program?
<
#include <iostream>
#include <math.h>
#include <iomanip>
using namespase std;
int main()
{
int k,n,a;
int numbers[a];
cout<<"Vvedite razmer massiva"<<endl;
cin>>k;
if (k=1)
{
cout<<"Vvedite chislo bolshe edenitsi"<<endl;
return 1;
}
else
if(k%2==0) k=n;
for (i=0; i<=n;i++)
{
cout<<"Vvedite "<<i+1<<"-oe"<<endl;
cin>>a[i];
}
}
/code>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question