🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.funkcyjne
Article #956

wybieranie liczb ze zbioru

#956
From: mariusz117
Date: Fri, 24 Apr 2009 09:35
22 lines
1350 bytes
Witajcie,

Mój problem dotyczy wybierania liczb. Powiedzmy, że mam zbór liczb i chcę 
wybrać co ntą liczbę. Zobrazuje to przykładem gdzie c będzie oznaczać co 
którą liczbę wybieram.

org: 0 1 2 3 4 5 6 7
--------------------
c=2: 0 2 4 6 1 3 5 7
c=3: 0 3 6 1 4 7 2 5
c=4: 0 4 0 4 0 4 0 4
c=5: 0 5 2 7 4 1 6 3
c=6: 0 6 4 2 0 6 4 2
c=7: 0 7 6 5 4 3 2 1

Jesli ktoś wie jak go rozwiązać to bardzo proszę o podanie algorytmu w miarę 
prosty sposób, przy pomocy słów kluczowych: while, if, for

pozdrawiam

-- 
Wysłano z serwisu Usenet w portalu Gazeta.pl -> http://www.gazeta.pl/usenet/
Technical Details
Message-ID: <gss15o$s3v$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: " mariusz117" <mariusz117@gazeta.SKASUJ-TO.pl>
Newsgroups: pl.comp.lang.funkcyjne
Subject: wybieranie liczb ze zbioru
Date: Fri, 24 Apr 2009 09:35:52 +0000 (UTC)
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 22
Message-ID: <gss15o$s3v$1@inews.gazeta.pl>
NNTP-Posting-Host: localhost
X-Trace: inews.gazeta.pl 1240565752 28799 172.20.26.239 (24 Apr 2009 09:35:52 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Fri, 24 Apr 2009 09:35:52 +0000 (UTC)
X-User: mariusz117
X-Forwarded-For: 94.246.152.210
X-Remote-IP: localhost
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit