I need to make a program that will delete one element from array and shift to the left... Am not that good at english i hope you understand.
This is what i have done.. please help. its writen on my language, if someone can help you can write it on english. thx guys!
[code]
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int n;
cout << "Unesite velicinu niza : \n";
cin >> n;
cout << endl << endl;
int x[n];
cout << "Unesite brojeve :\n" << endl;
for (int i = 0;i < n; i++)
{
cout << "x["<<i<<"]-- >";
cin >> x[i];
}cout << endl;
cout << "Unesite broj koji zelite da obrisete : \n";
int a;
a = n;
cin >> a;
for (int i = 0;i < a; i++)
{
a[x] = a[x+1];
a[x-1] = 0;
cout << x[n] << endl;
cout << endl;
}
system ("PAUSE");
return 0;
Last edited on
Thanx "coder777". Your are the best!
I finished the program..