http://img840.imageshack.us/img840/7898/skanowanie0007o.jpg
mam takie zadanie
moj kod zupelnie mi nie dziala prosze o pomoc
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
const int MAX_N = 30;
int A[MAX_N];
int k,n,c=0;
cout<<"Podaj ilosc wyrazow tablicy: "; cin>> n;
for(int i=0; i<n; i++){
A[i]=i+1;
}
cout<<"Podaj co ktory wyraz ma usunac: "; cin>>k;
while (c<=n){
c=c+k;
A[c-1]=0;
if(c>n){
c=c-n;
A[c-1]=0;}
else if (A[c-1]==0){
c=c-n+1;
A[c-1]=0;}
}
for(int i=0;i<n;i++){
cout<<setw(5)<<A[i];}
system("pause");
return 0;
}