// zadanie_5_XIII.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
int k;
cin>>k;
double *mas;
mas = new double[k];
int i;
bool poloj,poloj2,block=false;
cout<<"["<<0<<"]=";
cin>>mas[0];
if(mas[0]>=0)
poloj=true;
else
poloj=false;
for(i=1;i<k;i++)
{
cout<<"["<<i<<"]=";
cin>>mas[i];
if(mas[i]>=0)
poloj2=true;
else
poloj2=false;
if(poloj==poloj2)
block=true;
else
poloj=poloj2;
}
if(block==true)
cout<<"Ne znakocheredujushajasa\n";
else
cout<<"Znakocheredujushajasa\n";
system("pause");
return 0;
}
Comments