Zadatak56-16

#include <iostream>
using namespace std;
int main ()

{
int i,N,niz[100];
//unos broja clanova niza
cin>> N;
for(i=0;i<N;i++)
cin>>niz[i];
for (i=0;i<N-1;i++)
if( niz[i]==niz[i+1]) niz[i+1]++;
for( i=0;i<N;i++)
cout<< “ “ <<niz[i]<<“ „;

return 0;

}

Advertisements